Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a warning for when engine assets have the same name as game assets #2

Open
JaoSchmidt opened this issue Jun 19, 2024 · 1 comment
Assignees
Labels
todo Needs to do

Comments

@JaoSchmidt
Copy link
Owner

Compiling using multiple cores (flag -j#) will result in textures not being displayed

image

Problem won't occur if compiled with a single core

image

@JaoSchmidt JaoSchmidt self-assigned this Jun 19, 2024
@JaoSchmidt JaoSchmidt added the bug Something isn't working label Jun 19, 2024
@JaoSchmidt
Copy link
Owner Author

JaoSchmidt commented Jun 19, 2024

TODO: Make small warning for files of same name


Update, the problem is a race condition between two rsync commands at the same time: File inside my local pc Example/spriteGame/resources/shaders/Texture.glsl:

#shader vertex
#version 330 core

layout(location = 0) in vec3 a_Position;
layout(location = 1) in vec4 a_Color;
layout(location = 2) in vec2 a_TexCoord;
layout(location = 3) in float a_TexIndex;
layout(location = 4) in float a_TilingFactor;

uniform mat4 u_ViewProjection;
uniform mat4 u_Transform;
uniform mat4 u_Testing;

out vec4 v_Color;
out vec2 v_TexCoord;
out float v_TexIndex;
out float v_TilingFactor;

void main()
{
    v_Color = a_Color;
    v_TexCoord = a_TexCoord;
    v_TexIndex = a_TexIndex;
    v_TilingFactor = a_TilingFactor;
    gl_Position = u_ViewProjection * u_Transform * vec4(a_Position, 1.0);   
}

#shader fragment
#version 330 core

layout(location = 0) out vec4 color;
in vec2 v_TexCoord;
in vec4 v_Color;
in float v_TexIndex;
in float v_TilingFactor;

uniform sampler2D u_Textures[32];

void main()
{
    color = texture(u_Textures[int(v_TexIndex)], v_TexCoord * v_TilingFactor) * v_Color;
    // color = v_Color;
}

Is replacing Pain/resources/shaders/Texture.glsl on my local pc as well
Has a incompatible version for intel integrated chips compared to my test shader

@JaoSchmidt JaoSchmidt added enhancement New feature or request and removed bug Something isn't working labels Jul 20, 2024
@JaoSchmidt JaoSchmidt changed the title Compiling using multiple cores (flag -j#) will result in textures not being displayed Add a warning for when engine assets have the same name as game assets Jul 20, 2024
@JaoSchmidt JaoSchmidt added todo Needs to do and removed enhancement New feature or request labels Nov 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
todo Needs to do
Projects
None yet
Development

No branches or pull requests

1 participant