Canvas Renderer

Canvas Renderer

202k Downloads

Accept wrapping texture coordinates for non-atlas materials

grondag opened this issue ยท 1 comments

commented

LativianModder has an entity render that exploits texture wrapping to simplify rendering of a multi-block model. Currently this cannot work with Canvas because UV coordinates are always conveyed as normalized unsigned shorts.

The enhancement would allow non-atlas materials to define a min/max value for UV coordinates and scale UV coordinates accordingly. The vertex format would still be unsigned shorts, but in shader this would be rescaled to whatever the defined range is. The default range would be 0-1 and 0-1 would still be required for atlas textures.

Enabling this feature for a material would also enable wrapping for the bound texture.

commented

An alternative / complement to this would be to expose a way to ignore render layers and let those render directly to the frame buffer as in vanilla. Obviously limitations with that approach but potentially a useful backstop when the API does not have what is needed.