Jump to content

[SOLVED] Emission UV2 and alpha blending


photo

Recommended Posts

Hi,

Any idea why the following material, using alpha blending and the secondary UV for emission is not compiling?

<?xml version="1.0" encoding="utf-8"?>
<material name="my_mat" version="2.9.0.0" guid="5008a5bad5ee0b18c9b95b842e12b57e37f44074" base_material="mesh_base">

  <options transparent="2" order="21" depth_mask="0" cast_shadow="0" cast_world_shadow="0" receive_shadow="1" receive_world_shadow="1"/>
  <blend src="src_alpha" dest="one_minus_src_alpha"/>
  <texture name="albedo" wrap="repeat">guid://62fec93c6e69136b9af491ceca106ed5de3a7230</texture>

  <state name="emission">1</state>
  <state name="emission_bake_gi">0</state>
  <parameter name="emission_color">1 1 1 1</parameter>
  <texture name="emission" wrap="repeat">guid://62fec93c6e69136b9af491ceca106ed5de3a7230</texture>
  <state name="emission_mapping">2</state>

</material>

The error is:

Failed to compile fragment shader: core/shaders/mesh/transparent/ambient.shader
Compilation log:
    (3286,12-28): error X3003: redefinition of 'emission_texcoord'

Seems related to ambient pass and emission_mapping being 2?

This is in 2.9 version. Previously in 2.5, secondary UV was not available for emission texture so I have to add it manually in the mesh_base shaders code and it worked.

Kind Regards,

Adrian L.

VSTEP

Link to comment

Hi and sorry, false alarm. Some of our old modification code was kept in ambient shader after the source merge. The base mesh material indeed correctly works with emission_mapping as 2.

Regards,

Adrian L.

Link to comment
  • silent changed the title to [SOLVED] Emission UV2 and alpha blending
×
×
  • Create New...