Search found 51 matches
- Sun Feb 19, 2012 6:32 pm
- Forum: Advanced Help
- Topic: HLSL instancing problem
- Replies: 16
- Views: 2549
Re: HLSL instancing problem
I've been at this a few days now with no success. Just a bunch of improperly shaded instanced cubes. @Mel, what exactly would I pass to the shader for the "instanceWorldViewInverseArray"? What do I multiply and where do I find it in irrlicht exactly? Has anyone else had this problem while ...
- Fri Feb 17, 2012 9:31 pm
- Forum: Advanced Help
- Topic: HLSL instancing problem
- Replies: 16
- Views: 2549
Re: HLSL instancing problem
Well, maybe there is an easier way around this. In my particular shader, the normals aren't really important but rather the dot product of the normal and a normalized light direction vector. I currently multiply the light direction by the inverse world before I pass it to the shader, but I figure in...
- Fri Feb 17, 2012 7:56 pm
- Forum: Advanced Help
- Topic: HLSL instancing problem
- Replies: 16
- Views: 2549
Re: HLSL instancing problem
No, I tried that but it didn't work. The multiplication doesn't even return a normalized vector and even if I normalize it after it still isn't right.
- Fri Feb 17, 2012 7:27 pm
- Forum: Advanced Help
- Topic: HLSL instancing problem
- Replies: 16
- Views: 2549
Re: HLSL instancing problem
I'm sorry, I didn't really mean translation. I meant rotation specifically. Don't the normals need to be altered in order to match the rotation?
- Fri Feb 17, 2012 5:57 pm
- Forum: Advanced Help
- Topic: HLSL instancing problem
- Replies: 16
- Views: 2549
HLSL instancing problem
When trying to use hardware instancing with an HLSL shader from slavik262 I run into a problem. The normals don't seem to rotate along with the vertex manipulation. I'm not very good with the math so all my attempts to fix the normals have failed :( float4x4 viewProjection; #define NUM_BATCH_INSTANC...
- Fri Feb 17, 2012 12:49 am
- Forum: Code Snippets
- Topic: [HLSL]A Complete Shader Instancing Example
- Replies: 19
- Views: 8323
Re: [HLSL]A Complete Shader Instancing Example
So when trying to use this shader and expand on it, I noticed that the normal data also needs to be transformed.
How would I do this in the shader? I'm not very good with the math yet
How would I do this in the shader? I'm not very good with the math yet
- Thu Feb 16, 2012 11:14 pm
- Forum: Advanced Help
- Topic: setRenderTarget
- Replies: 6
- Views: 1141
Re: setRenderTarget
Do you know how I would even start to do the directX thing your're talking about? I prefer directX over openGL anyway,
- Thu Feb 16, 2012 3:26 am
- Forum: Advanced Help
- Topic: setRenderTarget
- Replies: 6
- Views: 1141
setRenderTarget
I've noticed that the setRenderTarget method causes a significant slowdown in frame rate. Does anyone know any tricks to speed things up. In particular, when rendering for a shadowmap pass, I must set the render target to a texture and then set the render target back to the screen for final rendering.
- Mon Feb 06, 2012 5:14 pm
- Forum: Advanced Help
- Topic: Wrong thinking
- Replies: 4
- Views: 688
Re: Wrong thinking
Thank you so much! I still don't understand why my code didn't work though. rotationToDirection takes the vector you want to rotate as a parameter. Shouldn't my code just be rotating it and the rotating it right back?
- Mon Feb 06, 2012 5:17 am
- Forum: Advanced Help
- Topic: Wrong thinking
- Replies: 4
- Views: 688
Wrong thinking
Can someone help me understand why when vector3df rot, pos; pos.set(9.0,17.0,8.0); rot.set(67.0,90.0,50.0); pos.set(rot.rotationToDirection(pos)); rot.invert(); pos.set(rot.rotationToDirection(pos)); position doesn't still equal [9.0,17.0,8.0] ???? All its doing is rotating a vector and then rot...
- Mon Jan 23, 2012 5:18 am
- Forum: Advanced Help
- Topic: View Frustum
- Replies: 7
- Views: 1677
Re: View Frustum
I think the problem is coming from the fact that the view and projection matrix im trying to derive it from is orthogonal. Does anyone know the math to cull objects not in the view of an orthogonal camera?
- Sun Jan 22, 2012 7:39 pm
- Forum: Advanced Help
- Topic: View Frustum
- Replies: 7
- Views: 1677
Re: View Frustum
I'm trying to create my own render technique. I need to be able to perform different passes (like a depth pass for shadow mapping). I guess I could try to work towards using the sceneManager's native drawAll function
- Sun Jan 22, 2012 6:09 pm
- Forum: Advanced Help
- Topic: View Frustum
- Replies: 7
- Views: 1677
Re: View Frustum
Thank you for your help, but the main reason I'm using the ViewFrustum class is to implement culling. I took the culling function from the scene manager and modified it to a function that takes the view frustum and the scene node, then returns the cull state. //! returns if node is culled bool Effec...
- Sun Jan 22, 2012 5:41 am
- Forum: Advanced Help
- Topic: View Frustum
- Replies: 7
- Views: 1677
View Frustum
I'm having trouble with the view frustum class. Whenever I try to create it using my view matrix or projection matrix it doesnt seem to work right. I also don't understand why the constructor says it can use either matrix, but then there's no way to specify to the constructor. Very confused. Also (u...
- Fri Jan 20, 2012 1:45 am
- Forum: Beginners Help
- Topic: Respectfully giving credit
- Replies: 0
- Views: 341
Respectfully giving credit
I've noticed that in the source of XEffects, there is a copyright comment line on the bottom. I am currently using the code in my project but have also edited it quite a bit. If I released the code, how do I denote proper credit? I want to give credit to "Ahmed Hilali", but not miss repres...