admin管理员组文章数量:1289775
I was making a sky shader in Godot, but I encountered an error with the following code:
vec2 sky_uv = EYEDIR.xz / EYEDIR.y;
vec3 Clouds = texture(Cloud_texture, sky_uv * Cloud_scale * TIME * Cloud_Direction * 0.001).rgb = texture(Cloud_texture2, sky_uv * Cloud_scale * TIME * Cloud_Direction2 * 0.0058).rgb;
sky += Clouds;
The error is assignment to function
.
Can anyone tell me how to fix it?
I was making a sky shader in Godot, but I encountered an error with the following code:
vec2 sky_uv = EYEDIR.xz / EYEDIR.y;
vec3 Clouds = texture(Cloud_texture, sky_uv * Cloud_scale * TIME * Cloud_Direction * 0.001).rgb = texture(Cloud_texture2, sky_uv * Cloud_scale * TIME * Cloud_Direction2 * 0.0058).rgb;
sky += Clouds;
The error is assignment to function
.
Can anyone tell me how to fix it?
- 1 The lack of proper code formatting makes it difficult for readers to help you. Please edit your question to format inline code properly and to use a code block for any code or error messages you have included. – zerocukor287 Commented Feb 21 at 14:46
- Please provide the error code. – Jonathan F. Commented Feb 24 at 15:13
1 Answer
Reset to default 1This line causes the reported error (you can't assign values to functions):
vec3 Clouds = texture(...).rgb = texture(...).rgb;
I guess you erased a variable involved in the second assignment, like:
vec3 Clouds = texture(Cloud_texture, sky_uv * Cloud_scale * TIME * Cloud_Direction * 0.001).rgb;
vec3 Clouds2 = texture(Cloud_texture2, sky_uv * Cloud_scale * TIME * Cloud_Direction2 * 0.0058).rgb;
本文标签: godotHow can I fix the cloud shader error quotassignment to functionquotStack Overflow
版权声明:本文标题:godot - How can I fix the cloud shader error "assignment to function"? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741401215a2376678.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论