flip horizontal UVs of cubemap render

pull/3/head
cosmonaut 2020-10-19 12:48:32 -07:00
parent 0a7698c315
commit 8407a34c37
3 changed files with 4 additions and 3 deletions

BIN
Effects/FXB/LinearDepthEffect.fxb (Stored with Git LFS)

Binary file not shown.

View File

@ -25,6 +25,7 @@ VertexShaderOutput main_vs(VertexShaderInput input)
{
VertexShaderOutput output;
output.Position = mul(input.Position, ModelViewProjection);
output.Position.x *= -1; // otherwise cube map render will be horizontally flipped
output.PositionWorld = mul(input.Position, Model);
return output;
}

View File

@ -276,7 +276,7 @@ namespace Kav
TextureCube skybox
) {
GraphicsDevice.RasterizerState.CullMode = CullMode.CullClockwiseFace;
SkyboxEffect.Skybox = skybox;
SkyboxEffect.Skybox = PointShadowCubeMap;
var view = camera.View;
view.Translation = Vector3.Zero;