Skip to content

Commit

Permalink
[macOS] support OpenGL < 4.2 in PBS shader
Browse files Browse the repository at this point in the history
- OpenGL < 4.2 does not support swizzling built in types (e.g. float).
- Update the definition of @piece( maxR1F0 ) to work in OpenGL 4.1

Signed-off-by: Rhys Mainwaring <[email protected]>
  • Loading branch information
srmainwaring committed Aug 11, 2021
1 parent 44a1948 commit c4279af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ogre2/src/media/Hlms/Pbs/GLSL/BRDFs_piece_ps.glsl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@property( !fresnel_scalar )
@piece( maxR1F0 )max( 1.0 - ROUGHNESS, @insertpiece( F0 ).x )@end
@end @property( fresnel_scalar )
@piece( maxR1F0 )max( (1.0 - ROUGHNESS).xxx, @insertpiece( F0 ).xyz )@end
@piece( maxR1F0 )max( (1.0 - vec3(ROUGHNESS, 0.0, 0.0)).xxx, @insertpiece( F0 ).xyz )@end
@end

//For mortals:
Expand Down

0 comments on commit c4279af

Please sign in to comment.