mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
add block material shaders
- 'shader' property of block materials: shaders/materials/<name>.glslv, .glslf with material_vertex / material_fragment hooks and #param uniforms - material shaders code is included into main, translucent and shadows programs through generated headers, no extra draw calls - chunk vertex normal.w byte replaced with 'flags': bit 7 - emission flag, bits 0-6 - material shader index (vertex format size is not changed) - doc/*/block-materials.md
This commit is contained in:
parent
f90750c066
commit
81489a13cf
33 changed files with 761 additions and 53 deletions
|
|
@ -41,7 +41,7 @@ void main() {
|
|||
a_fog = calc_fog(length(viewmodel * vec4(pos3d * FOG_POS_SCALE, 0.0)) / 256.0);
|
||||
#endif
|
||||
|
||||
a_emission = v_normal.w;
|
||||
a_emission = unpack_emission(v_normal.w);
|
||||
|
||||
vec4 viewmodelpos = u_view * a_modelpos;
|
||||
a_position = viewmodelpos.xyz;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue