HI all, I have what I hope is a simple question regarding rendering of overlays.
I've almost fully grasped the metadata model system for resource packs but what I'm trying to finally understand is a lingering question about overlays and how Minecraft renders them. If we look at the grass_block, there are 2 elements defined for that block. The first defines the top / bottom / side faces and what textures are to be rendered on those. There is a subsequent element that defines the side faces again and a special overlay texture that is transparent and will be tinted based on the biome's tint.
My question is then when Minecraft detects that a model's face is to have more than one texture applied as in the case of the side overlay, does it first render the side face using the base texture and then render a second pass with the overlay or does the client perform some optimization here to render the face once?
In the minecraft.jar I see a block and overlay shaders. The block shader is very standard, sampling the single diffuse and applying a color modulation to the final output color where-as the overlay shader samples two textures before rendering the final color. It would seem to me than the client then does the optimization like I suspected and rather than using the block shader it uses the overlay shader to render both textures in a single pass, right?
Is there a document or reference guide somewhere that explains the mappings between model definitions and which shaders will be picked for rendering parts of the model's geometry?
HI all, I have what I hope is a simple question regarding rendering of overlays.
I've almost fully grasped the metadata model system for resource packs but what I'm trying to finally understand is a lingering question about overlays and how Minecraft renders them. If we look at the grass_block, there are 2 elements defined for that block. The first defines the top / bottom / side faces and what textures are to be rendered on those. There is a subsequent element that defines the side faces again and a special overlay texture that is transparent and will be tinted based on the biome's tint.
My question is then when Minecraft detects that a model's face is to have more than one texture applied as in the case of the side overlay, does it first render the side face using the base texture and then render a second pass with the overlay or does the client perform some optimization here to render the face once?
In the minecraft.jar I see a block and overlay shaders. The block shader is very standard, sampling the single diffuse and applying a color modulation to the final output color where-as the overlay shader samples two textures before rendering the final color. It would seem to me than the client then does the optimization like I suspected and rather than using the block shader it uses the overlay shader to render both textures in a single pass, right?
Is there a document or reference guide somewhere that explains the mappings between model definitions and which shaders will be picked for rendering parts of the model's geometry?