From dc1e8b6dc367cd8b897e1c8d89949afcffd2ee36 Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Tue, 21 Jul 2026 14:07:51 +0200 Subject: [PATCH] Rename reserved GLSL word on AMD GPU --- resources/shaders/110/texture_displacement_bump.fs | 4 ++-- resources/shaders/110/texture_displacement_bump.vs | 8 ++++---- resources/shaders/140/texture_displacement_bump.fs | 8 ++++---- resources/shaders/140/texture_displacement_bump.vs | 8 ++++---- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/resources/shaders/110/texture_displacement_bump.fs b/resources/shaders/110/texture_displacement_bump.fs index a3c44413b5..75a2baa290 100644 --- a/resources/shaders/110/texture_displacement_bump.fs +++ b/resources/shaders/110/texture_displacement_bump.fs @@ -40,7 +40,7 @@ varying vec3 clipping_planes_dots; varying vec4 model_pos; varying vec4 world_pos; varying float weight; -varying float active; +varying float island_active; varying vec2 vertex_uv; void projection_axes(vec3 n, out vec3 t, out vec3 b) @@ -81,7 +81,7 @@ void main() // Mikkelsen surface-gradient bump; see the 140 variant for the full rationale. Scale-exact // for a conformal LSCM map (no global 1/tiling assumption), and gated by the paint weight // via a multiply so the branch stays uniform (use_vertex_uv is a uniform). - vec2 uv = (active > 0.5) + vec2 uv = (island_active > 0.5) ? vec2(dot(island_delta_lin.xy, vertex_uv), dot(island_delta_lin.zw, vertex_uv)) + island_delta_tr : vertex_uv; float h = texture2D(height_tex, uv).r; diff --git a/resources/shaders/110/texture_displacement_bump.vs b/resources/shaders/110/texture_displacement_bump.vs index 293129cbb8..5e268ed346 100644 --- a/resources/shaders/110/texture_displacement_bump.vs +++ b/resources/shaders/110/texture_displacement_bump.vs @@ -17,7 +17,7 @@ varying vec3 clipping_planes_dots; varying vec4 model_pos; varying vec4 world_pos; varying float weight; -varying float active; +varying float island_active; varying vec2 vertex_uv; void main() @@ -28,7 +28,7 @@ void main() gl_Position = projection_matrix * view_model_matrix * model_pos; clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z); - weight = v_normal.x; - active = v_normal.y; - vertex_uv = v_tex_coord; + weight = v_normal.x; + island_active = v_normal.y; + vertex_uv = v_tex_coord; } diff --git a/resources/shaders/140/texture_displacement_bump.fs b/resources/shaders/140/texture_displacement_bump.fs index 3844e709f8..58f79722aa 100644 --- a/resources/shaders/140/texture_displacement_bump.fs +++ b/resources/shaders/140/texture_displacement_bump.fs @@ -60,7 +60,7 @@ uniform vec2 uv_offset; uniform bool invert; uniform bool use_vertex_uv; // true: sample at vertex_uv with a derived tangent frame (LSCM) // A 2x3 affine (columns packed as lin = (m00, m01, m10, m11), tr = (m02, m12)) applied to the uv of -// the island currently being dragged in the UV editor (active > 0.5). Identity when nothing is +// the island currently being dragged in the UV editor (island_active > 0.5). Identity when nothing is // dragged, so this whole path is a no-op then. Lets a UV island drag move the bump on the model with // only a uniform update uniform vec4 island_delta_lin; @@ -70,7 +70,7 @@ in vec3 clipping_planes_dots; in vec4 model_pos; in vec4 world_pos; in float weight; -in float active; +in float island_active; in vec2 vertex_uv; out vec4 out_color; @@ -125,8 +125,8 @@ void main() // derivatives are well defined; the paint weight gates the result by a plain multiply (k) // rather than a per-fragment branch, keeping it that way. // The dragged island's uv rides a uniform affine so its bump moves without a rebuild; every - // other vertex (active == 0) samples its baked uv unchanged. - vec2 uv = (active > 0.5) + // other vertex (island_active == 0) samples its baked uv unchanged. + vec2 uv = (island_active > 0.5) ? vec2(dot(island_delta_lin.xy, vertex_uv), dot(island_delta_lin.zw, vertex_uv)) + island_delta_tr : vertex_uv; float h = texture(height_tex, uv).r; diff --git a/resources/shaders/140/texture_displacement_bump.vs b/resources/shaders/140/texture_displacement_bump.vs index 4518fb6687..3cb82284a7 100644 --- a/resources/shaders/140/texture_displacement_bump.vs +++ b/resources/shaders/140/texture_displacement_bump.vs @@ -27,7 +27,7 @@ out vec3 clipping_planes_dots; out vec4 model_pos; out vec4 world_pos; out float weight; -out float active; +out float island_active; out vec2 vertex_uv; void main() @@ -38,7 +38,7 @@ void main() gl_Position = projection_matrix * view_model_matrix * model_pos; clipping_planes_dots = vec3(dot(world_pos, clipping_plane), world_pos.z - z_range.x, z_range.y - world_pos.z); - weight = v_normal.x; - active = v_normal.y; - vertex_uv = v_tex_coord; + weight = v_normal.x; + island_active = v_normal.y; + vertex_uv = v_tex_coord; }