Skip to content

Commit

Permalink
Bug fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
angeluriot committed Sep 11, 2023
1 parent 6a510e3 commit 7e23e32
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion libraries/GLM
Submodule GLM updated 116 files
4 changes: 2 additions & 2 deletions shaders/compute/cl_compute_shader.cl
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ real2_t square(real2_t z)
return multiply(z, z);
}

float4 get_color(float iterations, float max_iterations, float4* pallet, int colors_nb)
float4 get_color(float iterations, float max_iterations, __global float4* pallet, int colors_nb)
{
float value = iterations / max_iterations;
float4 color = (float4)(1.f, 1.f, 1.f, 1.f);
Expand Down Expand Up @@ -278,7 +278,7 @@ __kernel void burning_ship(__global float4* pixels, int max_iterations, real_t p
pixels[get_global_id(1) * get_global_size(0) + get_global_id(0)] = color;
}

void set_pixel(float4* pixels, int2 pos, int2 screen_size, int i, int max_iterations, int nb_points, float brightness)
void set_pixel(__global float4* pixels, int2 pos, int2 screen_size, int i, int max_iterations, int nb_points, float brightness)
{
if (pos.x >= 0 && pos.x < screen_size.x && pos.y >= 0 && pos.y < screen_size.y)
{
Expand Down
2 changes: 1 addition & 1 deletion shaders/post.frag
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ uniform sampler2D u_texture;

void main()
{
frag_color = texture2D(u_texture, v_texcoord);
frag_color = texture(u_texture, v_texcoord);
}

0 comments on commit 7e23e32

Please sign in to comment.