From ed47aa226df6a2cf69a953432275ffb5b9208202 Mon Sep 17 00:00:00 2001 From: PepperCode1 <44146161+PepperCode1@users.noreply.github.com> Date: Mon, 22 Jan 2024 09:00:18 -0800 Subject: [PATCH] Revert addition of flw_vertexDiffuse and flw_fragDiffuse --- docs/shader-api/fragment.glsl | 3 --- docs/shader-api/vertex.glsl | 2 -- .../assets/flywheel/flywheel/internal/common.frag | 7 +------ .../assets/flywheel/flywheel/internal/common.vert | 6 ------ .../assets/flywheel/flywheel/internal/common_api_impl.frag | 2 -- .../assets/flywheel/flywheel/internal/common_api_impl.vert | 2 -- 6 files changed, 1 insertion(+), 21 deletions(-) diff --git a/docs/shader-api/fragment.glsl b/docs/shader-api/fragment.glsl index 95107cf4d..71b29f901 100644 --- a/docs/shader-api/fragment.glsl +++ b/docs/shader-api/fragment.glsl @@ -13,9 +13,6 @@ /*const*/ float flw_distance; -/*const*/ bool flw_vertexDiffuse; - -bool flw_fragDiffuse; vec4 flw_fragColor; ivec2 flw_fragOverlay; vec2 flw_fragLight; diff --git a/docs/shader-api/vertex.glsl b/docs/shader-api/vertex.glsl index 169ade9ba..338923540 100644 --- a/docs/shader-api/vertex.glsl +++ b/docs/shader-api/vertex.glsl @@ -7,8 +7,6 @@ ivec2 flw_vertexOverlay; vec2 flw_vertexLight; vec3 flw_vertexNormal; -bool flw_vertexDiffuse; - /*const*/ FlwMaterial flw_material; // To be implemented by the instance shader. diff --git a/src/main/resources/assets/flywheel/flywheel/internal/common.frag b/src/main/resources/assets/flywheel/flywheel/internal/common.frag index 533e905f5..a88bdd6cc 100644 --- a/src/main/resources/assets/flywheel/flywheel/internal/common.frag +++ b/src/main/resources/assets/flywheel/flywheel/internal/common.frag @@ -10,8 +10,6 @@ uniform sampler2D _flw_diffuseTex; uniform sampler2D _flw_overlayTex; uniform sampler2D _flw_lightTex; -flat in uint _flw_vertexDiffuse; - out vec4 _flw_outputColor; void _flw_main() { @@ -20,16 +18,13 @@ void _flw_main() { flw_fragOverlay = flw_vertexOverlay; flw_fragLight = flw_vertexLight; - flw_vertexDiffuse = bool(_flw_vertexDiffuse); - flw_fragDiffuse = flw_vertexDiffuse; - flw_beginFragment(); flw_materialFragment(); flw_endFragment(); vec4 color = flw_fragColor; - if (flw_fragDiffuse) { + if (flw_material.diffuse) { float diffuseFactor; if (flw_constantAmbientLight == 1u) { diffuseFactor = diffuseNether(flw_vertexNormal); diff --git a/src/main/resources/assets/flywheel/flywheel/internal/common.vert b/src/main/resources/assets/flywheel/flywheel/internal/common.vert index e7045f810..4cd86566e 100644 --- a/src/main/resources/assets/flywheel/flywheel/internal/common.vert +++ b/src/main/resources/assets/flywheel/flywheel/internal/common.vert @@ -1,10 +1,6 @@ #include "flywheel:internal/fog_distance.glsl" -flat out uint _flw_vertexDiffuse; - void _flw_main(in FlwInstance instance) { - flw_vertexDiffuse = flw_material.diffuse; - _flw_layoutVertex(); flw_beginVertex(); flw_instanceVertex(instance); @@ -13,8 +9,6 @@ void _flw_main(in FlwInstance instance) { flw_vertexNormal = normalize(flw_vertexNormal); - _flw_vertexDiffuse = uint(flw_vertexDiffuse); - flw_distance = fogDistance(flw_vertexPos.xyz, flw_cameraPos.xyz, flw_fogShape); gl_Position = flw_viewProjection * flw_vertexPos; } diff --git a/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.frag b/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.frag index dea3ab9a2..3423727df 100644 --- a/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.frag +++ b/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.frag @@ -11,8 +11,6 @@ in vec3 flw_vertexNormal; in float flw_distance; -bool flw_vertexDiffuse; - vec4 flw_sampleColor; FlwMaterial flw_material; diff --git a/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.vert b/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.vert index e17c0084f..2cddb2e42 100644 --- a/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.vert +++ b/src/main/resources/assets/flywheel/flywheel/internal/common_api_impl.vert @@ -12,6 +12,4 @@ out vec3 flw_vertexNormal; out float flw_distance; -bool flw_vertexDiffuse; - FlwMaterial flw_material;