READ THE RULES: Click here

Follow us on Facebook: https://www.facebook.com/xentax/ :)

Drawing a voxel mesh with multiple materials

Get your graphics formats figures out here! Got details for others? Post here!
Post Reply
episoder
veteran
Posts: 142
Joined: Fri Oct 16, 2015 8:05 pm
Has thanked: 3 times
Been thanked: 67 times

Re: Drawing a voxel mesh with multiple materials

Post by episoder » Mon Aug 05, 2019 11:35 am

not exactly the correct forum section.

minecraft type of rendering? use a general shader with specular enabled and specular textures. it's easier to manage. also, if you use a texture2d array like a stack of same size textures you essentially have a easy way of indexing the textures by material id aka the depth in the stack.

the other way you could do it without the spec texture is if you would preprocess the quads (2 triangle)s and add a specular value into a 'per face' instance buffer while the vertices still have the simple data. that means if that works. usually when using instances (in dx9 it's SetStreamSourceFreq), the same faces are rendered multiple times. that's the other way around.

Post Reply