Sign in

Julian

@schneckerstein.bsky.social
387 followers 433 following 53 posts

-10x Code-Person @symmetrybreak.bsky.social Working on Misgiven and Tasty Grass Shader

PostsRepliesMedia
Julian @schneckerstein.bsky.social · 19/03/2025
And on top: Just because you got Volumetric Light, it doesn't mean that everything is shrouded by fog.
010 1
Julian @schneckerstein.bsky.social · 19/03/2025
The Half-Life 2 RTX looks fantastic, but could people PLEASE respect the original art direction? Just because you have path tracing doesn't mean you crank all your lights by x10. Just because you got PBR now doesn't mean all your surface should have 0.0 roughness.
140 4
Julian @schneckerstein.bsky.social · 03/01/2025
This concept is of course possible with Vector2/3/x as well. Take this example, where I calculate the magnitude/length of four 2D points at once. Keep in mind: I barely scratched the surface here of what's possible, not to mention that SEE1 came out in 1999. Happy Coding! (5/5)
#include <xmmintrin.h> 
void Distances_SIMD(void)
{
    float points_X_arr[] = {16.0f, 00.0f, 10.0f, 43.0f};
    float points_Y_arr[] = {00.0f, 16.0f, 10.0f, 08.0f};
    __m128 points_X = _mm_load_ps(points_X_arr);
    __m128 points_Y = _mm_load_ps(points_Y_arr);

    __m128 xSqr = _mm_mul_ps(points_X, points_X);
    __m128 ySqr = _mm_mul_ps(points_Y, points_Y); 
    __m128 length = _mm_sqrt_ps(_mm_add_ps(xSqr, ySqr));

    float lengths[4];
    _mm_store_ps(lengths, length);
    for(int i = 0; i < 4; i++){
      printf("Point = (%f,%f), Length = %f.\n", points_X_arr[i], points_Y_arr[i], length[i]);
    }
}
000 0
Julian @schneckerstein.bsky.social · 03/01/2025
Now for thinking as SIMD as "multiple things at once" the code would look like this. The key is here that we batched multiple calculation together, processing 4 circles at once. (4/5)
110 1
Julian @schneckerstein.bsky.social · 03/01/2025
Instead, you have to think about SIMD as processing multiple items at a once. For example: you have a list of circles and want to calculate their area. The basic version would process one circle at the time. With thinking of SIMD as "fast Vector4" there would be no room for improvement. (3/5)
void CircleArea_SIMD(void)
{
  float circlesRadii[] = {1.0f, 2.0f, 0.5f, 4.0f};
  __m128 circlesRadius = _mm_load_ps(circlesRadii);

  const float pi = 3.141f;
  __m128 pi_wide = _mm_load_ps1(&pi);
  // caluclate: pi * radius * radius, but for 4 radii at once.
  __m128 areas =  _mm_mul_ps(pi_wide, _mm_mul_ps(circlesRadius, circlesRadius));
  
  float areaScalar[4];
  _mm_store_ps(areaScalar, areas);
  for(int i = 0; i < 4; i++){
    printf("Radius = %f, Area = %f.\n", circlesRadii[i], areaScalar[i]);
  }
}
110 1
Julian @schneckerstein.bsky.social · 27/11/2024
thanks for 100 followers
010 1
Julian @schneckerstein.bsky.social · 09/10/2023
Made a smool game for the @play.date on the InnoGames Jam #14 with @marchingduck.bsky.social, Nadine and @polygonas.bsky.social Everything done in cozy C! Github repo + Download: github.com/julhe/Andenk... Gamepage: www.igjam.eu/jams/igjam-1...
062 6
Julian @schneckerstein.bsky.social · 03/10/2023
Oof, GLSL for WebGL uses glsl100 while GLSL for 3.3 (Desktop) uses glsl330 My current solution...
100 1
Julian @schneckerstein.bsky.social · 01/10/2023
Engine update: * Cleaner Font + Google Material Icons * Highlight for selected and hovered objects * Basic light support with inverse square falloff and reinhard tonemapper. * Lots of internal refactor: I have now a Core, Game and Editor context (like a normal person).
010 1
Julian @schneckerstein.bsky.social · 24/09/2023
Worlds most ugliest gizmo working in my custom engine. (would love to show a gif or mp4, but I can't??)
060 6