Closed stephen-hqxu closed 2 years ago
Notice some inconsistent uses of types in many shaders, better to correct them for consistency.
unsigned int
uint
GLSL standard only defines uint as the valid type for unsigned integer, better to avoid unsigned int.
https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPHeightfieldTerrain.frag#L32
Use of ^^^ unsigned int and vvv uint in the same file.
https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPHeightfieldTerrain.frag#L175
float
int
textureLod function takes a float in the last argument.
textureLod
https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPBidirectionalScattering.frag#L38
^^^ Passing lod parameter as float and vvv as int.
https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPAmbientOcclusion.frag#L48-L50
There are also style inconsistency for layout qualifier:
layout
https://github.com/stephen-hqxu/superterrainplus/blob/3836fc2c8a7bc77c4f3b026a0aadb8901f7298d4/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPDeferredShading.frag#L104
^^^ Without space between layout and (...) vvv with space.
https://github.com/stephen-hqxu/superterrainplus/blob/3836fc2c8a7bc77c4f3b026a0aadb8901f7298d4/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPHeightfieldTerrain.frag#L86
Notice some inconsistent uses of types in many shaders, better to correct them for consistency.
Mixing
unsigned int
anduint
GLSL standard only defines
uint
as the valid type for unsigned integer, better to avoidunsigned int
.https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPHeightfieldTerrain.frag#L32
Use of ^^^
unsigned int
and vvvuint
in the same file.https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPHeightfieldTerrain.frag#L175
Mixing
float
andint
for textureLod functiontextureLod
function takes afloat
in the last argument.https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPBidirectionalScattering.frag#L38
^^^ Passing lod parameter as
float
and vvv asint
.https://github.com/stephen-hqxu/superterrainplus/blob/8954eda5f00de90723ca87a1a23551ff180c5f56/SuperTerrain%2B/ModuleInterface/SuperRealism%2B/Shader/STPAmbientOcclusion.frag#L48-L50