Open AaronGhost opened 2 years ago
@AaronGhost For the second one, "Removing the outer array in an array index expression", are you able to paste the necessary buffer block declarations?
I am not quite sure to understand the question. I picked two different lines from two shaders so the main did not make much sense. I edited with a distinct ext value.
The buffer block could be something like this:
layout(std430, binding = 0) buffer buffer_0
{
int ext_1;
uint ext_3[10];
int ext_4[2];
int ext_5[3];
};
A value of ext_4[0] = 0 for example leads to a "loop" behaviour.
I have been experimenting with both glsl-reduce and perses as reducers. It seems that Perses performs more reduction opportunities than glsl-reduce, especially in reducing more aggressively array indexes. Please find below some examples of structures reduced first with glsl-reduce and then with perses.
glsl-reduce
perses
glsl-reduce
perses
glsl-reduce
perses
glsl-reduce
perses