Skip to content

Commit

Permalink
Add rendertype_tripwire to fix some facade cable anchors to not showi…
Browse files Browse the repository at this point in the history
…ng correctly.
  • Loading branch information
shartte committed Apr 2, 2024
1 parent c8eee20 commit a7dd2ef
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/components/model-viewer/shaderInfo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ export type ShaderProps = {
};

// Properties from Shaders found in MC
// For "lighting", check if the vertex-shader samples the lightmap (i.e. via minecraft_sample_lightmap)
// vertexColor should be true if the shader uses vertex-specific color (and i.e. maintains it even after sampling
// the lightmap)
// "textured" indicates that the fragment shader samples the texture and uses its color
// "alphaTest" indicates the alpha value under which the fragment is discarded
const shaderInfos: Record<string, ShaderProps> = {
rendertype_solid: {
lighting: "lightmap",
Expand All @@ -42,6 +47,12 @@ const shaderInfos: Record<string, ShaderProps> = {
vertexColor: true,
textured: true,
},
rendertype_tripwire: {
lighting: "lightmap",
alphaTest: 0.1,
vertexColor: true,
textured: true,
},
rendertype_entity_cutout: {
lighting: "diffuse",
alphaTest: 0.1,
Expand Down

0 comments on commit a7dd2ef

Please sign in to comment.