adrian.licuriceanu Posted September 11, 2019 Share Posted September 11, 2019 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
silent Posted September 12, 2019 Share Posted September 12, 2019 Hi Adrian, In 2.9 you can select UV channel for Emission pass in default mesh_base material, so you don't need custom material for that. Will it fit your needs? How to submit a good bug report --- FTP server for test scenes and user uploads: ftp://files.unigine.com user: upload password: 6xYkd6vLYWjpW6SN Link to comment
adrian.licuriceanu Posted September 12, 2019 Author Share Posted September 12, 2019 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
Recommended Posts