mirror of
https://github.com/RPCS3/rpcs3.git
synced 2026-07-09 17:25:18 -06:00
gl/vk: Fix projected coordinate lookup on a cubemap sampler
This commit is contained in:
parent
8fa3f0721e
commit
f7d767d0e8
@ -61,7 +61,7 @@ std::string getFunctionImpl(FUNCTION f)
|
|||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE:
|
||||||
return "texture($t, $0.xyz)";
|
return "texture($t, $0.xyz)";
|
||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_PROJ:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_PROJ:
|
||||||
return "textureProj($t, $0.xyzw, $1.x)"; // Note: $1.x is bias
|
return "texture($t, ($0.xyz / $0.w))";
|
||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_LOD:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_LOD:
|
||||||
return "textureLod($t, $0.xyz, $1.x)";
|
return "textureLod($t, $0.xyz, $1.x)";
|
||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_GRAD:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_GRAD:
|
||||||
|
|||||||
@ -66,7 +66,7 @@ namespace vk
|
|||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE:
|
||||||
return "texture($t, $0.xyz)";
|
return "texture($t, $0.xyz)";
|
||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_PROJ:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_PROJ:
|
||||||
return "textureProj($t, $0.xyzw, $1.x)"; // Note: $1.x is bias
|
return "texture($t, ($0.xyz / $0.w))";
|
||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_LOD:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_LOD:
|
||||||
return "textureLod($t, $0.xyz, $1.x)";
|
return "textureLod($t, $0.xyz, $1.x)";
|
||||||
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_GRAD:
|
case FUNCTION::FUNCTION_TEXTURE_SAMPLECUBE_GRAD:
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user