What would be the best way to simulate the light from a disco ball?
In Unity you would use a point light and then give it a “cookie” which I believe is a cubemap that works as a texture filter for the light.
How hard do you think that would be to implement?
UPDATE
Eeeek looking at how we bind the stuff for the pointLight, It might be better to extend the materials I need and bind the data for the single light and cubemap.
Now the question is how do I get a shadowMap to contribute to this and obfuscate the “light” from the projected cubemap on the correct meshes.
I have a 0.0 intensity light in the scene at the same position as my shader light so that the normal attributes get bound to the shader for the meshes.
My guess is I need to capture a cubeDepthPass from the lights perspective, then sample that on the fragment check my depth at that position and if its farther then what the sample for the depth Pass says then don’t add any color from the projection?
Sooo the next question (that ill prolly end up self answering anyways) is how do you generate a cubeDepthMap? Time to google ^_^.
This is cool, but not really what I am looking for.
I just need to figure out how to get the shadows appearing on the meshes in my example pg and I can take it from there. Definitely appreciate your attempt to help though!
This is what it would look like, but this only works with one shadow system. I essentially need to highjack this so the regular shadow systems can work over the top.
Naw, I just need to test the position vs the depth of the probe texture and match that up. I think I figured out what I’m doing wrong and will see about fixing it here soon.
I’ll toss the real texture on there and show an example here today if I get a chance. I appreciate your help but think we got it .