TGMs Shader Package[C++/GLSL]

Post those lines of code you feel like sharing or find what you require for your project here; or simply use them as tutorials.

Postby TeTine » Thu Feb 28, 2008 6:41 pm

Hi,

I tried to use the postProcessMotionBlur with Irrlicht 1.4 but it didn't work
I had to change some details in the header (there's no more Textures array in SMaterial) but then when I try to run the program it prints in the output window :
HLSL vertex shader compilation failed:
(1): error X3000: syntax error: unexpected token 'vec2'

and since I understand almost nothing in shaders I didn't try to modify anything.

Any idea about where the problem is?
Irrlicht noob =p
TeTine
 
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France

Postby Nadro » Thu Feb 28, 2008 6:58 pm

This pack is write in GLSL, so only for OpenGL mode, but You try run shader in DirectX mode, so You have this errors ;)
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby TeTine » Thu Feb 28, 2008 7:02 pm

lol ok
that was really noob XD
thx it works fine now =)
Irrlicht noob =p
TeTine
 
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France

Postby MKiG » Fri Jun 20, 2008 6:31 pm

I'm having a problem with it too.
I can't get it to work with "Material.Textures[0]=rt0;" and when I take it out, it just renders an image file (I don't know why).

Is there any work around for this?
Image
MKiG
 
Posts: 9
Joined: Sun Oct 29, 2006 3:55 pm

Postby hybrid » Fri Jun 20, 2008 8:22 pm

try material.setTexture(0,rt)
hybrid
Admin
 
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany

Postby huydotnet » Sun Jun 29, 2008 4:30 pm

err... how can i change it to use with DirectX? GLSL -> HLSL... but how :| (i not learned them yet)
User avatar
huydotnet
 
Posts: 81
Joined: Tue Sep 25, 2007 12:26 pm
Location: Danang, Vietnam

Postby Nadro » Sun Jun 29, 2008 10:45 pm

You have to rewrite this shader manually;)
Nadro
 
Posts: 1647
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Postby dlangdev » Sun Jun 29, 2008 11:41 pm

GLSL and HLSL expose their fixed functionality parameters differently. For example in GLSL, position is gl_position which is different in HLSL. That's just one, there are many others.

There's no way you can take GLSL code and compile on a HLSL compiler, you have to find a translator for that. Try the oracle of Google, there's a tool for that.
Image
User avatar
dlangdev
 
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR

Postby Halifax » Mon Jun 30, 2008 5:58 am

Or you could just abstract the interface into an automated process that is concerned about the low-level work. Then all you, or other people, would have to do is provide backends to generate the low-level code.

But that's beside the point. :lol:
TheQuestion = 2B || !2B
User avatar
Halifax
 
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Postby huydotnet » Mon Jun 30, 2008 9:17 am

:| i can't find any GLSL to HLSL converter :| only HLSL to GLSL
User avatar
huydotnet
 
Posts: 81
Joined: Tue Sep 25, 2007 12:26 pm
Location: Danang, Vietnam

Postby xsocom » Tue Nov 11, 2008 2:48 pm

Would be nice to see an water shader :)
xsocom
 
Posts: 80
Joined: Thu Sep 13, 2007 8:34 am

GlassDemoWIP Problem

Postby tenko » Wed Nov 19, 2008 12:49 pm

There is a problem.
Z buffer is not shared.

Image
tenko
 
Posts: 2
Joined: Wed Nov 19, 2008 12:30 pm

Postby lucifer1101 » Wed Nov 19, 2008 10:42 pm

lol that looks like a ghost effect of some sort, i know it isnt an actual effect but a ghost effect would be nice..
lucifer1101
 
Posts: 42
Joined: Sun Nov 16, 2008 11:23 pm
Location: Melbourne, Australia

Postby Aelis440 » Sun Dec 21, 2008 10:41 am

It appears that the Bloom interferes with how irrlicht renders shadows. Is there a quick fix to this? Essentially, whenever I use the bloom->render(), I can no longer see any of my shadows being drawn no matter how much I play around with numbers, or the order in which I call draw and render functions in my gameloop. By the way, this code snippet is awesome :)
Aelis440
 
Posts: 52
Joined: Sun Oct 05, 2008 8:45 pm

Postby GameDude » Sun Dec 21, 2008 6:19 pm

Nice stuff, it all looks really good
GameDude
 
Posts: 488
Joined: Thu May 24, 2007 12:24 am

PreviousNext

Return to Code Snippets

Who is online

Users browsing this forum: No registered users and 1 guest

cron