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
First of all, here is the context which allowed me to discover the problem.
I try to add an unsigned integer constant to a variable by adding a U behind the number.
uint a = 10U ;
This doesn't work ! IMHO that is already a problem !
It can be bypassed by using an overkilling casting :
uint a = uint(10) ;
Then I tried to add other characters, and there surprise, the compiler does not throw a warning or an error on the wrong number format :
int a = 50ABCDEFGHIJddsdssdsqd ;
Same with hexadecimal number :
int b = 0x50ABCDEFGHIJKLMNOPQRSTUVWXYZ ;
Same with float number :
float fa = 1.0ABCDEFGHIJKLM ;
Steps to reproduce
Create a Sprite2D
Assign an ImageTexture to the Sprite texture (size 200x200 for example)
Create a ShaderMaterial for the Sprite2D material
Create a canvas shader with the following code :
shader_type canvas_item;
void fragment()
{
float fa = 1.0ABCDEFGHIJKLM ;
int a = 50ABCDEFGHIJddsdssdsqd ;
int b = 0x50ABCDEFGHIJKLMNOPQRSTUVWXYZ ;
//uint c = 10U ;
COLOR = vec4(float(a)/255.0,float(b)/255.0,0.0,1.0);
}
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered:
Godot version
v4.0.dev.20211117.official [175690957]
System information
Windows 10, Vulkan, NVIDIA GeForce GTX 970
Issue description
First of all, here is the context which allowed me to discover the problem.
I try to add an unsigned integer constant to a variable by adding a U behind the number.
This doesn't work ! IMHO that is already a problem !
It can be bypassed by using an overkilling casting :
Then I tried to add other characters, and there surprise, the compiler does not throw a warning or an error on the wrong number format :
Same with hexadecimal number :
Same with float number :
Steps to reproduce
Minimal reproduction project
No response
The text was updated successfully, but these errors were encountered: