Tag Info

New answers tagged

0

This needs to be done when you create the Box2DLight's Light object. You can fix this by setting the setSoftnessLength(float) on the Light object. For example: m_Light = new ConeLight(...); m_Light.setSoftnessLength(1.5f);


0

Fallback "VertexLit" might be hiding an issue with the primary shader, although it looks fine to me. You should probably still remove that line until you know your main shader is working correctly. My other guesses would be that the mesh colors are not being set for some reason. Are you using the .sharedMesh instead of .mesh accessor? There's a lot of ...


0

I am not super familiar with the topic but I did do a little digging for you to try and come up with some easy to understand tutorials or articles. I hope you find at least one of these useful to you. I tried to avoid links that used deferred rendering. Link One Link Two Tutorials Advanced Rendering in OpenGL Random Tutorial Website


1

I'm not exactly sure what you want to hear, but I think deferred lighting is still the best for many light sources. The way you do that is that first you gather all the geometry properties by rendering the scene without any lighting at all. You basically render the scene in 4 versions into a buffer called G-Buffer: color, normal, depth, position. You may ...


1

General Description Quick Note irradiance maps are the image of the world around a point (environment map) which has been recalculated so each pixel is actually the sum of incident lighting on a surface with a given normal. When given a surface you can use the normal to do a texture lookup to get the indirect illumination value. OK, so your irradiance ...


1

You could do something as simple as XMVector3TransformNormal of the direction light with the original Rotation. Generally in SIMD-friendly coding, individual component access is a performance hit, so you want to avoid doing it whenever possible. That's why in DirectXMath (aka XNAMath version 3) the individual element members _11 - _44 were removed from ...


0

Before you get too deep into this project I'd like to comment. It looks like you're drawing the whole cube for each block in the world. If I am wrong, then ignore this, but if I'm right you should definitely consider a more efficient approach. You do want one normal per face, which probably means drawing cubes with 24 vertices (4 vertices per face, instead ...


0

If you would do hard normals for these boxes it would eliminate your problem. For that you have to have a normal not per vertex, but per face. You could do this by having four vertices with the same normal for each face of the cube, that is 24 vertices. That way, a whole face will receive an even amount of light. You also mention that you tried to combine ...



Top 50 recent answers are included