summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/backend/glsl
diff options
context:
space:
mode:
authorFernando S <fsahmkow27@gmail.com>2023-09-02 12:10:51 +0200
committerGitHub <noreply@github.com>2023-09-02 12:10:51 +0200
commit89a2d48cf8c05f0de31ad001a2506a478f595dee (patch)
tree470c6301c0a51ab56098e05b5f6736d5905c2ee6 /src/shader_recompiler/backend/glsl
parent5ce41fa2138127cb042603d34b89db3bfa715235 (diff)
parent9245b426e3d011e768cf3609e44df120e9667daa (diff)
Merge pull request #11430 from liamwhite/validation-error-whats-that
shader_recompiler: fix emulation of 3D textureGrad
Diffstat (limited to 'src/shader_recompiler/backend/glsl')
-rw-r--r--src/shader_recompiler/backend/glsl/emit_glsl_image.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
index 3ad668a47..d9872ecc2 100644
--- a/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
+++ b/src/shader_recompiler/backend/glsl/emit_glsl_image.cpp
@@ -558,7 +558,7 @@ void EmitImageGradient(EmitContext& ctx, IR::Inst& inst, const IR::Value& index,
if (multi_component) {
if (info.num_derivates >= 3) {
const auto offset_vec{ctx.var_alloc.Consume(offset)};
- ctx.Add("{}=textureGrad({},{},vec3({}.xz, {}.x),vec3({}.yz, {}.y));", texel, texture,
+ ctx.Add("{}=textureGrad({},{},vec3({}.xz, {}.x),vec3({}.yw, {}.y));", texel, texture,
coords, derivatives_vec, offset_vec, derivatives_vec, offset_vec);
return;
}