godotengine / godotengine/godot-docs

Different matrix construction rules to GLSL not clearly documented

Open
#7,999 1 comment 0 reactions 0 assignees View on GitHub
area:manual enhancement topic:shaders
Dominant language
reStructuredText
Stars
5.7k
Forks
3.8k
Avg merge
1d 20h
Merged PRs (30d)
25

Description

While following the book of shaders tutorials, i came across the following issue.

This function:
![image](https://github.com/godotengine/godot-docs/assets/76705401/bc880108-87df-4f79-86e8-596e795decdc)
does not compile in a .gdshader, and the error message is also very confusing:
![image](https://github.com/godotengine/godot-docs/assets/76705401/f4908872-86ef-4785-aca7-2221b9cdc273)

After looking through docs, in GLSL:
![image](https://github.com/godotengine/godot-docs/assets/76705401/555251fd-e2d4-4b3a-9c20-acb70d99747c)

But in .gdshader:
![image](https://github.com/godotengine/godot-docs/assets/76705401/87270394-95d0-4edc-9063-fdb234c6e61c)

Constructing matrices from floats is not allowed, and the error message makes me think that this was added recently.

IMO both the error message should be clearer and this difference should be documented in the "Converting GLSL to Godot shaders" page.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.