Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

_Wox_

Spotlight doesn't work

This topic is 5280 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a problem with spot lights in effect files - it just won''t work. Does anyone know what the problem is? technique FixedLighting { pass P0 { PixelShader = NULL; VertexShader = NULL; CullMode = None; Lighting = true; NormalizeNormals = true; SpecularEnable = false; LightType[0] = Spot; LightAmbient[0] = {0.1f, 0.1f, 0.1f, 0.1f}; LightDiffuse[0] = {1.0f, 1.0f, 1.0f, 1.0f}; LightSpecular[0] = {0.6f, 0.6f, 0.6f, 1.0f}; LightPosition[0] = {0.0f, 10.0f, 0.0f}; LightDirection[0] = {0.0f, -10.0f, 0.0f}; LightFalloff[0] = 1.0f; LightRange[0] = 1000.0f; LightTheta[0] = 0.62f; LightPhi[0] = 0.82f; LightAttenuation0[0]= 1.0f; LightAttenuation1[0]= 0.0f; LightAttenuation2[0]= 0.0f; LightEnable[0] = true; MaterialAmbient = {0.1f, 0.1f, 0.1f, 1.0f}; MaterialDiffuse = {0.0f, 0.0f, 0.0f, 1.0f}; MaterialEmissive = {0.0f, 0.0f, 0.0f, 0.0f}; MaterialPower = 1.0f; MaterialSpecular = {1.0f, 1.0f, 1.0f, 1.0f}; WorldTransform[0] = (World); ViewTransform = (View); ProjectionTransform = (Projection); Sampler[0] = (EffectSampler); } } Thanks! /W

Share this post


Link to post
Share on other sites
Advertisement
Please give more information. Do other light types work? Are you able to render objects to the screen if you have lighting disabled? In general, are you sure that the problem is with the spot light and not something else?

neneboricua

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!