Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

local_size_x, etc. in OpenGL compute shader

$
0
0

I have written a compute shader that calculates a quaternion Julia set. The strange thing, is that it works best when I state: layout(local_size_x = 1, local_size_y = 1) in;

I tried bumping it up to 32x32, but I get a decrease in performance. This is on AMD and Intel. Is there any rhyme or reason behind this? Also, is there such a thing as inline functions in GLSL?

The shader as a whole looks like this:

#version 430 core

layout(local_size_x = 1, local_size_y = 1) in;
layout(binding = 0, r32f) writeonly uniform image2D output_image;
layout(binding = 1, rgba32f) readonly uniform image2D …

Viewing all articles
Browse latest Browse all 17560

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>