klepto2 Posted January 19, 2024 Posted January 19, 2024 if you set the near range of a camera > 0.3 the skybox get clipped by the frustum and if > 0.5 it is not visible at all. 1 Quote Windows 10 Pro 64-Bit-Version NVIDIA Geforce 1080 TI
Josh Posted January 19, 2024 Posted January 19, 2024 I can probably fix this in the skybox shader just by multiplying the vertex position .... Quote Let's build cool stuff and have fun.
Solution Josh Posted January 22, 2024 Solution Posted January 22, 2024 Easy shader fix in Sky.vert void main() { texCoords = normalize(VertexPosition.xyz); mat4 cameraMatrix = ExtractEntityMatrix(CameraID); vec4 pos = VertexPosition; pos.xyz *= CameraRange.x + (CameraRange.y - CameraRange.x) * 0.5f; pos.xyz += cameraMatrix[3].xyz; gl_Position = CameraProjectionViewMatrix * pos; gl_Position.z = (gl_Position.z + gl_Position.w) * 0.5f; } Quote Let's build cool stuff and have fun.
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.