[C++] Reflective Water (conversion from .NET)
Re: [C++] Reflective Water (conversion from .NET)
This demo no longer works under Irrlicht 1.8
Re: [C++] Reflective Water (conversion from .NET)
Ofcourse it doesnt! The code is likely from pre 2007;-)
Re: [C++] Reflective Water (conversion from .NET)
Well this demos worked fine up to Irrlicht 1.7.3, and there is no reason that it should not in 1.8.
The shaders are all good, the rest of the code is normal stuff.
The shaders are all good, the rest of the code is normal stuff.
Re: [C++] Reflective Water (conversion from .NET)
Does it even compile? if yes, how does the onsetShaderConstants function look like? Else, what else is wrong?
Re: [C++] Reflective Water (conversion from .NET)
It compiles fine, and everything is standard. I have some other shaders that now also don´t work if I use 1.8, and they were shader samples out of standard samples.
Reflective water just sets up a parallax plane and a reflective plane, has a camera which takes an upshot of the scene and renders it to the texture which the shader uses. All bog standard stuff, but for some reason, there seems to be a change in 1.8 that stops the shader reading the texture, and everything is black.
Its a good sample to reproduce the issue on 1.8
Reflective water just sets up a parallax plane and a reflective plane, has a camera which takes an upshot of the scene and renders it to the texture which the shader uses. All bog standard stuff, but for some reason, there seems to be a change in 1.8 that stops the shader reading the texture, and everything is black.
Its a good sample to reproduce the issue on 1.8
Re: [C++] Reflective Water (conversion from .NET)
Problem most likely lies with how textures are passed to the shader. onsetShaderConstant now takes int as texture reference type input instead of float/f32. This was already mentioned on the forum, search for 'shader handling broken' or something similar.
Re: [C++] Reflective Water (conversion from .NET)
Yeah I saw that somewhere. Under GLSL its passing texture refs as floats, would that stop it working? Easy to fix though!
Is that change related to a new standard for GLSL shaders across all systems, or just for Irrlicht?
Is that change related to a new standard for GLSL shaders across all systems, or just for Irrlicht?
Re: [C++] Reflective Water (conversion from .NET)
just irrlicht, and only needs to be changed in your program code, other than that float ref's are still possible in certain scena
Re: [C++] Reflective Water (conversion from .NET)
So why was it changed to int, if the standard is still float?
Re: [C++] Reflective Water (conversion from .NET)
The standard was never float. Irr sending them as floats was a hack, and it was now fixed.
Re: [C++] Reflective Water (conversion from .NET)
okay, that´s good then, I will update my code to the standard!
Re: [C++] Reflective Water (conversion from .NET)
Gee, that's an old demo (and an old thread). From a quick scan of the code it appears to be Shader Model 1.1 for GL and SM2.0 for "other". There may be a few bugs in there - this *is* from six years ago - so be aware. For example, that test for "IF (GL) do this ELSE assume DX9" is not exactly robust!
Irrlicht Demos: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=45781
Re: [C++] Reflective Water (conversion from .NET)
Works fine, some "old" things still work perfectly,... like some of our own DNA, hundreds of millions of years old!