mirror of
https://github.com/raysan5/raylib.git
synced 2026-02-06 14:19:18 -05:00
Refactor removing extra space and add break line for { (#5533)
Co-authored-by: maiconpintoabreu <maicon@thinkpad02.exads.com>
This commit is contained in:
@ -44,7 +44,7 @@ float GetCharacter(float n, vec2 p)
|
||||
// Main shader logic
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void main()
|
||||
void main()
|
||||
{
|
||||
vec2 charPixelSize = vec2(fontSize, fontSize);
|
||||
vec2 uvCellSize = charPixelSize/resolution;
|
||||
|
||||
@ -63,7 +63,7 @@ float sdSixWayCutHollowSphere(vec3 p, float r, float h, float t)
|
||||
}
|
||||
|
||||
// SRC: https://iquilezles.org/articles/boxfunctions
|
||||
vec2 iBox(in vec3 ro, in vec3 rd, in vec3 rad)
|
||||
vec2 iBox(in vec3 ro, in vec3 rd, in vec3 rad)
|
||||
{
|
||||
vec3 m = 1.0/rd;
|
||||
vec3 n = m*ro;
|
||||
|
||||
@ -19,7 +19,8 @@ uniform float ampY;
|
||||
uniform float speedX;
|
||||
uniform float speedY;
|
||||
|
||||
void main() {
|
||||
void main()
|
||||
{
|
||||
float pixelWidth = 1.0/size.x;
|
||||
float pixelHeight = 1.0/size.y;
|
||||
float aspect = pixelHeight/pixelWidth;
|
||||
|
||||
@ -42,7 +42,7 @@ float GetCharacter(float n, vec2 p)
|
||||
// Main shader logic
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void main()
|
||||
void main()
|
||||
{
|
||||
vec2 charPixelSize = vec2(fontSize, fontSize);
|
||||
vec2 uvCellSize = charPixelSize / resolution;
|
||||
|
||||
@ -61,7 +61,7 @@ float sdSixWayCutHollowSphere(vec3 p, float r, float h, float t)
|
||||
}
|
||||
|
||||
// SRC: https://iquilezles.org/articles/boxfunctions
|
||||
vec2 iBox(in vec3 ro, in vec3 rd, in vec3 rad)
|
||||
vec2 iBox(in vec3 ro, in vec3 rd, in vec3 rad)
|
||||
{
|
||||
vec3 m = 1.0/rd;
|
||||
vec3 n = m*ro;
|
||||
|
||||
@ -17,7 +17,8 @@ uniform float ampY;
|
||||
uniform float speedX;
|
||||
uniform float speedY;
|
||||
|
||||
void main() {
|
||||
void main()
|
||||
{
|
||||
float pixelWidth = 1.0/size.x;
|
||||
float pixelHeight = 1.0/size.y;
|
||||
float aspect = pixelHeight/pixelWidth;
|
||||
|
||||
@ -38,7 +38,7 @@ float GetCharacter(int n, vec2 p)
|
||||
// Main shader logic
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
void main()
|
||||
void main()
|
||||
{
|
||||
vec2 charPixelSize = vec2(fontSize, fontSize);
|
||||
vec2 uvCellSize = charPixelSize/resolution;
|
||||
|
||||
@ -23,7 +23,8 @@ uniform vec3 viewPosition;
|
||||
const float QUADRATIC = 0.032;
|
||||
const float LINEAR = 0.09;
|
||||
|
||||
void main() {
|
||||
void main()
|
||||
{
|
||||
vec3 fragPosition = texture(gPosition, texCoord).rgb;
|
||||
vec3 normal = texture(gNormal, texCoord).rgb;
|
||||
vec3 albedo = texture(gAlbedoSpec, texCoord).rgb;
|
||||
|
||||
@ -5,7 +5,8 @@ layout (location = 1) in vec2 vertexTexCoord;
|
||||
|
||||
out vec2 texCoord;
|
||||
|
||||
void main() {
|
||||
void main()
|
||||
{
|
||||
gl_Position = vec4(vertexPosition, 1.0);
|
||||
texCoord = vertexTexCoord;
|
||||
}
|
||||
|
||||
@ -10,7 +10,8 @@ in vec3 fragNormal;
|
||||
uniform sampler2D diffuseTexture;
|
||||
uniform sampler2D specularTexture;
|
||||
|
||||
void main() {
|
||||
void main()
|
||||
{
|
||||
// store the fragment position vector in the first gbuffer texture
|
||||
gPosition = fragPosition;
|
||||
// also store the per-fragment normals into the gbuffer
|
||||
|
||||
@ -59,7 +59,7 @@ float sdSixWayCutHollowSphere(vec3 p, float r, float h, float t)
|
||||
}
|
||||
|
||||
// https://iquilezles.org/articles/boxfunctions
|
||||
vec2 iBox(in vec3 ro, in vec3 rd, in vec3 rad)
|
||||
vec2 iBox(in vec3 ro, in vec3 rd, in vec3 rad)
|
||||
{
|
||||
vec3 m = 1.0/rd;
|
||||
vec3 n = m*ro;
|
||||
|
||||
@ -22,7 +22,8 @@ uniform float ampY;
|
||||
uniform float speedX;
|
||||
uniform float speedY;
|
||||
|
||||
void main() {
|
||||
void main()
|
||||
{
|
||||
float pixelWidth = 1.0/size.x;
|
||||
float pixelHeight = 1.0/size.y;
|
||||
float aspect = pixelHeight/pixelWidth;
|
||||
|
||||
Reference in New Issue
Block a user