mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Workaround for Nvidia driver bug
This commit is contained in:
parent
743c467d07
commit
f1d7421698
3 changed files with 11 additions and 2 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -12,6 +12,7 @@ CMakeFiles/
|
|||
CMakeScripts/
|
||||
cmake_install.cmake
|
||||
build*/
|
||||
cmake-build-relwithdebinfo-visual-studio/
|
||||
release*/
|
||||
debug*/
|
||||
gprof*/
|
||||
|
|
|
@ -48,7 +48,10 @@ void main(void) {
|
|||
vec3 normalEye = normalize(posEye.xyz);
|
||||
|
||||
vec3 binormalEye = normalize(cross(normalEye, tangentEye));
|
||||
posEye.xyz += _distanceFromCenter * vertex.binormalAndHalfWidth.w * binormalEye;
|
||||
// Workaround for Nvidia driver bug
|
||||
posEye.x += _distanceFromCenter * vertex.binormalAndHalfWidth.w * binormalEye.x;
|
||||
posEye.y += _distanceFromCenter * vertex.binormalAndHalfWidth.w * binormalEye.y;
|
||||
posEye.z += _distanceFromCenter * vertex.binormalAndHalfWidth.w * binormalEye.z;
|
||||
<$transformEyeToClipPos(cam, posEye, gl_Position)$>
|
||||
<@if not HIFI_USE_FORWARD@>
|
||||
<$transformEyeToWorldDir(cam, normalEye, _normalWS)$>
|
||||
|
|
|
@ -51,7 +51,12 @@ void main(void) {
|
|||
vec3 dirX = normalize(cross(vec3(0.0, 1.0, 0.0), dirZ));
|
||||
vec3 dirY = vec3(0.0, 1.0, 0.0);
|
||||
|
||||
vec4 pos = vec4(proxyPosEye.xyz + proxy.sphere.w * ( dirX * spriteVert.x + dirY * spriteVert.y /* + dirZ * spriteVert.z*/), 1.0);
|
||||
//vec4 pos = vec4(proxyPosEye.xyz + proxy.sphere.w * ( dirX * spriteVert.x + dirY * spriteVert.y + dirZ * spriteVert.z), 1.0);
|
||||
//Nvidia driver workaround
|
||||
vec4 pos = vec4(1.0, 1.0, 1.0, 1.0);
|
||||
pos.x = proxyPosEye.x + proxy.sphere.w * ( dirX.x * spriteVert.x + dirY.x * spriteVert.y + dirZ.x * spriteVert.z);
|
||||
pos.y = proxyPosEye.y + proxy.sphere.w * ( dirX.y * spriteVert.x + dirY.y * spriteVert.y + dirZ.y * spriteVert.z);
|
||||
pos.z = proxyPosEye.z + proxy.sphere.w * ( dirX.z * spriteVert.x + dirY.z * spriteVert.y + dirZ.z * spriteVert.z);
|
||||
varEyePos = pos.xyz;
|
||||
varTexcoord = spriteVert.xyz;
|
||||
<$transformEyeToClipPos(cam, pos, gl_Position)$>
|
||||
|
|
Loading…
Reference in a new issue