Fix: Metal: Remove some shader compilation warnings
This commit is contained in:
@@ -706,7 +706,7 @@ struct DepthOfFieldData {
|
||||
float4 filter_samples_weight;
|
||||
float filter_center_weight;
|
||||
/** Max number of sprite in the scatter pass for each ground. */
|
||||
int scatter_max_rect;
|
||||
uint scatter_max_rect;
|
||||
|
||||
int _pad0, _pad1;
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
void main()
|
||||
{
|
||||
if (gl_InstanceID >= dof_buf.scatter_max_rect) {
|
||||
if (uint(gl_InstanceID) >= dof_buf.scatter_max_rect) {
|
||||
/* Very unlikely to happen but better avoid out of bound access. */
|
||||
gl_Position = vec4(0.0);
|
||||
return;
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
void main()
|
||||
{
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
if (index >= resource_len) {
|
||||
if (index >= uint(resource_len)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -226,6 +226,8 @@ void main()
|
||||
case DEBUG_SHADOW_TILEMAP_RANDOM_COLOR:
|
||||
debug_random_tilemap_color(P, light);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
void main()
|
||||
{
|
||||
int index = int(gl_GlobalInvocationID.x);
|
||||
uint index = gl_GlobalInvocationID.x;
|
||||
if (index >= capture_info_buf.surfel_len) {
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user