gamecreator Posted November 6, 2017 Posted November 6, 2017 Probably a very simple question but if I have Light* light = DirectionalLight::Create(), how can I access shadowstagerange[4] via C++ code? I have some shadows acting weird and I think this could help, per Josh's suggestion here: https://www.leadwerks.com/community/topic/12573-directional-light-cast-shadow-distance-and-camera-zoom-important-issue/?do=findComment&comment=90577 If anyone's curious, this is what I'm looking at (shadow cutting off suddenly in a side-scroller). I already tried camera->SetMultisampleMode(32) and world->SetLightQuality(2) and setting various light ranges but nothing helped. Moving the camera left or right moves that edge left or right. If I move the camera closer, it doesn't change anything but if I move it back, the shadow gets shorter, so it's tied to the camera and/or light somehow. 1 Quote
macklebee Posted November 6, 2017 Posted November 6, 2017 1 Quote Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590 LE / 3DWS / BMX / Hexagon macklebee's channel
gamecreator Posted November 6, 2017 Author Posted November 6, 2017 Thank you. I switched my initial code to DirectionalLight* light = DirectionalLight::Create() and it allowed me to access that member. I suspect there's a way to make it do it just with Light *light but that's above my head right now. shadowstagerange[0] was 6.0 by default and once I bumped that up, the shadow stretched further out. Code for anyone curious: DirectionalLight* light = DirectionalLight::Create(); light->SetRotation(35, 35, 0); printf("Default [0] value: %f\n\n",light->shadowstagerange[0]); light->shadowstagerange[0]=40; 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.