Post Your Irrlicht Screenshots / Render Here.
-
- Posts: 170
- Joined: Sun Jul 01, 2007 11:41 pm
- Location: Manchester, UK
Maybe you can see the little thingy with a blue trail that breaches the bullet "wall". It's called Force and gets bigger when certain conditions are fulfilled. With the Force leveling up the shots get stronger and more opaque. The image but also the video don't really show the bullet movement as it is in the game and it looks much better, but I'm aware of the problem.
Please notice that everything you see is still wip.
Please notice that everything you see is still wip.
-
- Posts: 199
- Joined: Wed Nov 29, 2006 4:07 am
Just look through the XEffect's source code, it's all there. Also, I am planning to contribute some fixed function projective texturing materials for Irrlicht, which don't require any shaders to work.I am to the point of starting a thread in hopes that someone will take my hand and lead me through this matrix hell.
Cheers
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
-
- Posts: 199
- Joined: Wed Nov 29, 2006 4:07 am
I know! I have it right in front of me, trust me I have learned alot from all your examples. But this is still a little over my head right now. And your glsl writing style is quite different from they way I have learned, so it takes me a little time to understand it. I was thinking about looking into HLSL so I can better understand all the INS and OUTSBlindSide wrote:Just look through the XEffect's source code, it's all there
Signature? I ain't signin nuthin!
Well the third and fifth photos certainly look promising. Are you remembering to check your projected texcoords and discard them if they are outside the 0-1 range? Also you need to multiply them by 0.5 and add 0.5 to get them into the 0-1 range first.
So:
To get them from -1.0-1.0 to 0.0-1.0 range, and only use them when they are in the 0.0-1.0 range (Else they are outside the projection frustum.), you have to check it like so:
If you have the Z component handy also make sure to check for Texcoords.z > 0.0 so that you don't get back projection, thats when the projection source projects opposite to the direction it's facing.
The shadowmapping shaders in XEffects aren't very well commented so hopefully this clears some issues as to what I'm doing in there. If theres any particular parts you are confused about feel free to ask
So:
Code: Select all
Texcoords.xy = Texcoords.xy * vec2(0.5, 0.5) + vec2(0.5, 0.5);
Code: Select all
if(clamp(Texcoords.xy, vec2(0.0, 0.0), vec2(1.0, 1.0)) == Texcoords.xy)
{
// Only use them here. Else it has no effect or is cleared to a flat color.
}
The shadowmapping shaders in XEffects aren't very well commented so hopefully this clears some issues as to what I'm doing in there. If theres any particular parts you are confused about feel free to ask
ShadowMapping for Irrlicht!: Get it here
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net
Need help? Come on the IRC!: #irrlicht on irc://irc.freenode.net