diff --git a/scene/resources/visual_shader_nodes.cpp b/scene/resources/visual_shader_nodes.cpp index cf0cdd80cbf..3b0e30a56a1 100644 --- a/scene/resources/visual_shader_nodes.cpp +++ b/scene/resources/visual_shader_nodes.cpp @@ -7261,7 +7261,7 @@ String VisualShaderNodeFresnel::generate_code(Shader::Mode p_mode, VisualShader: normal = p_input_vars[0]; } if (p_input_vars[1].is_empty()) { - if (p_mode == Shader::MODE_SPATIAL) { + if (p_mode == Shader::MODE_SPATIAL && !p_for_preview) { view = "VIEW"; } else { view = "vec3(0.0)";