Search found 10 matches
- Sun Nov 24, 2019 3:57 pm
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
Glad to help. I plan to implement some advanced shader examples as supplements when I get free.
- Fri Nov 08, 2019 12:38 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
Okay. I will check for that on Github.CuteAlien wrote:Is there any chance you could change the license to zlib license for this? Then it'll fit into Irrlicht.
EDIT:
I have changed the license to zlib. Please let me know if there is a problem.
- Sun Nov 03, 2019 3:30 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
Oh that's cool! I'll check it once more next week, but on first view looks pretty good - I think we can use it like that. That's if you are OK, with us putting it into the engine? Tiny details I'm thinking about (but probably don't matter)... Not sure about mipmap filter... it's likely not doing an...
- Sat Nov 02, 2019 9:53 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
OpenGL indeed flips the texture matrix (I think this is going back to some image format, TGA probably, which was used in the OpenGL predecessor IRIS GL)... I wrote a simple post processing example recently and hosted it on Github at https://github.com/BoshenGuan/Irrlicht-Post-Processing-Example . H...
- Wed Oct 23, 2019 12:48 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
I think we even have some light shaders in OGL branch already. Doing something with a ScreenQuad is also a good idea. Still considering if I should adding a screenquad class or struct to Irrlicht, thought not quite sure where it fits. So just adding it as example for now is maybe a way to do that. ...
- Mon Oct 21, 2019 5:11 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
Uh... looking at shaders. Nothing makes sense? - mLightPos is actually the camera position (maybe deliberate - but then still bad naming...) - worldpos is calculated using the transpose world matrix instead of just world-matrix. - normal should use either world-matrix (without non-uniform scaling t...
- Thu Oct 17, 2019 3:05 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
Yes, mul(invWorld, normal) should be correct.devsh wrote:Should be correct if mul(matrix, vector) means a transpose of front multiply (since A^T.B^T = (AB)^T )
- Thu Oct 17, 2019 3:01 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Re: Normal transformation problem of Shaders example
Could be because it's mul(vector, matrix) instead of mul(matrix, vector). But just guessing, one of those simple questions which would take me a few hours to answer until I figure it all out again. Thanks for reply! In mul(vector, matrix) form just like the one in the example shader, the matrix I t...
- Wed Oct 16, 2019 8:01 am
- Forum: Advanced Help
- Topic: Normal transformation problem of Shaders example
- Replies: 16
- Views: 6517
Normal transformation problem of Shaders example
From example 10. Shaders example, in d3d9.hlsl, // transform normal float3 normal = mul(float4(vNormal,0.0), mInvWorld); The normal is transformed by mInvWorld. But I think it should be transformed by mInvWorldTrans, which is transposed of the inversed world matrix. Which one is correct? I am ve...
- Tue Mar 27, 2018 1:22 pm
- Forum: Beginners Help
- Topic: FOV horizontal, vertical
- Replies: 4
- Views: 1496
Re: FOV horizontal, vertical
I have just tested. setFov set Vertical FOV (Irrlicht 1.8.1), for sure