You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
NORMAL on ShaderMaterial shader_type canvas_item gets ignored unless you assign a texture on the new GUI "Normal Map" dropdown (ignoring uniform sampler2D set manually)
#9263
Closed
rubenjavier opened this issue
Jun 19, 2017
· 2 comments
Operating system or device - Godot version:
Linux 64bit Ubuntu 16.04 - Godot 3.0 alpha commit 0288be1
Issue description:
Adding a ShaderMaterial (for manual NormalMapping) to a Sprite using a uniform sampler2D to pass the normal_map gets ignored on the fragment if no texture is assigned also on the new GUI "Normal Map" dropdown
Steps to reproduce:
create a scene with:
.- a Light2D
.- a Sprite with a texture and a Material (ShaderMaterial)
*The Light2D has a texture with alpha (point light from the godot demos)
*The Light2D mode is Add with white color and energy=1
*The new "Normal Map" dropdown texture for the Sprite is kept at null
*The texture for the Sprite is a diffuse texture and the ShaderMaterial code is:
Similar to #7298, but with UV instead of NORMAL. Makes sense for fixed materials, but shader materials are custom by definition, so the fact UV or NORMAL are used in the shader should make the renderer bind these.
akien-mga
changed the title
[3.0] NORMAL on ShaderMaterial shader_type canvas_item gets ignored unless you assign a texture on the new GUI "Normal Map" dropdown (ignoring uniform sampler2D set manually)
NORMAL on ShaderMaterial shader_type canvas_item gets ignored unless you assign a texture on the new GUI "Normal Map" dropdown (ignoring uniform sampler2D set manually)
Jan 9, 2018
We have now entered release freeze for Godot 3.0 and want to focus only on release critical issues for that milestone. Therefore, we're moving this issue to the 3.1 milestone, though a fix may be made available for a 3.0.x maintenance release after it has been tested in the master branch during 3.1 development. If you consider that this issue is critical enough to warrant blocking the 3.0 release until fixed, please comment so that we can assess it more in-depth.
Operating system or device - Godot version:
Linux 64bit Ubuntu 16.04 - Godot 3.0 alpha commit 0288be1
Issue description:
Adding a ShaderMaterial (for manual NormalMapping) to a Sprite using a uniform sampler2D to pass the normal_map gets ignored on the fragment if no texture is assigned also on the new GUI "Normal Map" dropdown
Steps to reproduce:
create a scene with:
.- a Light2D
.- a Sprite with a texture and a Material (ShaderMaterial)
*The Light2D has a texture with alpha (point light from the godot demos)
*The Light2D mode is Add with white color and energy=1
*The new "Normal Map" dropdown texture for the Sprite is kept at null
*The texture for the Sprite is a diffuse texture and the ShaderMaterial code is:
shader_type canvas_item;
render_mode blend_add;
uniform sampler2D normal_tex;
void fragment(){
NORMAL = texture(normal_tex,UV).rgb * vec3(2.0,2.0,1.0) - vec3(1.0,1.0,0.0);
}
*The Shader Param "Normal Tex" is used to set the normal_map image of the diffuse texture
***The "NORMAL" calculation in the fragmet is ignored unless you set a texture on the new "Normal Map" dropdown on the GUI
The text was updated successfully, but these errors were encountered: