fixed defines on material overrides
This commit is contained in:
parent
ebe2d4db23
commit
2d26bb6d65
3 changed files with 2 additions and 7 deletions
|
@ -28,11 +28,6 @@ surface_shader [[
|
|||
data.alpha = saturate(data.alpha - v_fur_layer);
|
||||
#endif
|
||||
|
||||
// dx shader has internal errors on this
|
||||
#if defined ALPHA_CUTOUT && !defined LUMIX_DX_SHADER
|
||||
if(data.alpha < 0.5) discard;
|
||||
#endif
|
||||
|
||||
vec3 N = v_normal;
|
||||
vec3 tangent = v_tangent;
|
||||
|
||||
|
|
|
@ -283,7 +283,7 @@ function surface_shader_ex(args)
|
|||
void main()
|
||||
{
|
||||
Surface data = getSurface();
|
||||
#if defined ALPHA_CUTOUT && defined LUMIX_DX_SHADER
|
||||
#if defined ALPHA_CUTOUT
|
||||
if(data.alpha < 0.5) discard;
|
||||
#endif
|
||||
packSurface(data, o_gbuffer0, o_gbuffer1, o_gbuffer2);
|
||||
|
|
|
@ -2684,7 +2684,7 @@ struct PipelineImpl final : Pipeline
|
|||
const Material* material = mi->custom_material;
|
||||
|
||||
const gpu::StateFlags state = material->m_render_states | render_state;
|
||||
const gpu::ProgramHandle program = shader->getProgram(state, mesh.vertex_decl, instanced_define_mask | mesh.material->getDefineMask());
|
||||
const gpu::ProgramHandle program = shader->getProgram(state, mesh.vertex_decl, instanced_define_mask | material->getDefineMask());
|
||||
stream->useProgram(program);
|
||||
stream->bind(0, material->m_bind_group);
|
||||
stream->bindIndexBuffer(mesh.index_buffer_handle);
|
||||
|
|
Loading…
Reference in a new issue