Tag Info

Hot answers tagged

1

There is an advanced technology based on compute shaders that will analyze the depth buffer of the main camera, and return the min depth, and max depth, with 1 pixel precision (reduce operation). This information can be used to create a very precise frustum for the shadow camera. Elements outside the view that casts shadows are only in the frustum that goes ...


1

I don't do a frustum cull with the main camera, but the shadow camera alone. I calculate the AABB (axis aligned bounding box) of the shadow camera, then do the culling with that. A directional shadow camera is a box in itself (orthographic projection matrix projects to a side of the box). After the box is rotated (for different light direction), the AABB ...


1

screenPosition is not at the right scale for texture coordinate lookup. Texture2D::Sample expects texture coordinates (0..1) while Texture2D::Load expects texel coordinates (0..[Width or Height]-1). So you're probably sampling way off the edge of the texture and either hitting the border color, or clamping to the edge which happens to be black. As a ...



Only top voted, non community-wiki answers of a minimum length are eligible