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.
TeTine
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France
Contact:

Post by TeTine »

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
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

This pack is write in GLSL, so only for OpenGL mode, but You try run shader in DirectX mode, so You have this errors ;)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
TeTine
Posts: 17
Joined: Tue Nov 13, 2007 10:36 pm
Location: Nantes, France
Contact:

Post by TeTine »

lol ok
that was really noob XD
thx it works fine now =)
Irrlicht noob =p
MKiG
Posts: 9
Joined: Sun Oct 29, 2006 3:55 pm

Post by MKiG »

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
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

try material.setTexture(0,rt)
huydotnet
Posts: 81
Joined: Tue Sep 25, 2007 12:26 pm
Location: Danang, Vietnam

Post by huydotnet »

err... how can i change it to use with DirectX? GLSL -> HLSL... but how :| (i not learned them yet)
Nadro
Posts: 1648
Joined: Sun Feb 19, 2006 9:08 am
Location: Warsaw, Poland

Post by Nadro »

You have to rewrite this shader manually;)
Library helping with network requests, tasks management, logger etc in desktop and mobile apps: https://github.com/GrupaPracuj/hermes
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

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
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

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
huydotnet
Posts: 81
Joined: Tue Sep 25, 2007 12:26 pm
Location: Danang, Vietnam

Post by huydotnet »

:| i can't find any GLSL to HLSL converter :| only HLSL to GLSL
xsocom
Posts: 80
Joined: Thu Sep 13, 2007 8:34 am

Post by xsocom »

Would be nice to see an water shader :)
tenko
Posts: 2
Joined: Wed Nov 19, 2008 12:30 pm

GlassDemoWIP Problem

Post by tenko »

There is a problem.
Z buffer is not shared.

Image
lucifer1101
Posts: 42
Joined: Sun Nov 16, 2008 11:23 pm
Location: Melbourne, Australia
Contact:

Post by lucifer1101 »

lol that looks like a ghost effect of some sort, i know it isnt an actual effect but a ghost effect would be nice..
Aelis440
Posts: 52
Joined: Sun Oct 05, 2008 8:45 pm

Post by Aelis440 »

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 :)
GameDude
Posts: 498
Joined: Thu May 24, 2007 12:24 am

Post by GameDude »

Nice stuff, it all looks really good
Post Reply