-
Notifications
You must be signed in to change notification settings - Fork 666
Open
Description
I noticed you don't have support for other math functions, such as trunc()
. I tried to put the function call in anyhow, and it seems like the shader script outputs it as is, but it won't compile for some reason (thinks it's a missing identifier instead of a call).
float user_gx=(trunc((user_x/user_pixelSize))+user_xArraySelector);
float user_gridXDiff=(user_gx-user_gridX);
float user_gridDirX=sign(user_gridXDiff);
if ((user_outIndex==10.0)) {
kernelResult = user_gridDirX;return;
}
float user_gy=(trunc((user_y/user_pixelSize))+user_yArraySelector);
float user_gridYDiff=(user_gy-user_gridY);
float user_gridDirY=sign(user_gridYDiff);
if ((user_outIndex==11.0)) {
kernelResult = user_gridDirY;return;
}
Shader compilation errors
(283, 16): Undeclared identifier 'trunc'
I've used that function in other shaders in webgl and it works just fine.
Metadata
Metadata
Assignees
Labels
No labels