File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
resources/assets/xray/shaders/frag Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 1414import net .minecraft .client .Minecraft ;
1515import net .minecraft .client .renderer .RenderPipelines ;
1616import net .minecraft .client .renderer .ShapeRenderer ;
17+ import net .minecraft .resources .ResourceLocation ;
1718import net .minecraft .world .phys .Vec3 ;
1819import net .neoforged .neoforge .client .event .RenderLevelStageEvent ;
1920import org .joml .Matrix4fStack ;
21+ import pro .mikey .xray .XRay ;
2022
2123import java .util .OptionalDouble ;
2224import java .util .OptionalInt ;
@@ -30,7 +32,7 @@ public class Render {
3032 public static RenderPipeline LINES_NO_DEPTH = RenderPipeline .builder (RenderPipelines .MATRICES_COLOR_SNIPPET )
3133 .withLocation ("pipeline/xray_lines" )
3234 .withVertexShader ("core/rendertype_lines" )
33- .withFragmentShader ("core/rendertype_lines" )
35+ .withFragmentShader (ResourceLocation . fromNamespaceAndPath ( XRay . MOD_ID , "frag/constant_color" ) )
3436 .withUniform ("LineWidth" , UniformType .FLOAT )
3537 .withUniform ("ScreenSize" , UniformType .VEC2 )
3638 .withBlend (BlendFunction .TRANSLUCENT )
Original file line number Diff line number Diff line change 1+ #version 150
2+
3+ in vec4 vertexColor;
4+ out vec4 fragColor;
5+
6+ void main() {
7+ fragColor = vertexColor;
8+ }
You can’t perform that action at this time.
0 commit comments