Fix array initialization on Intel. Thankfully NVIDIA also accepts this syntax. If AMD expects something else I'll be pissed.

This commit is contained in:
Marisa the Magician 2019-07-02 11:17:16 +02:00
commit 294f05591c
5 changed files with 13 additions and 13 deletions

View file

@ -4,7 +4,7 @@
*/
void main()
{
float gauss4[4] = { 0.270682, 0.216745, 0.111281, 0.036633 };
float gauss4[4] = float4[]( 0.270682, 0.216745, 0.111281, 0.036633 );
vec2 coord = TexCoord;
vec4 res = texture(InputTexture,coord);
vec2 bresl = textureSize(InputTexture,0);

View file

@ -6,8 +6,8 @@ void main()
{
vec2 coord = TexCoord;
vec4 res = texture(InputTexture,coord);
vec2 ofs[16] =
{
vec2 ofs[16] = vec2[]
(
vec2(1.0,1.0), vec2(-1.0,-1.0),
vec2(-1.0,1.0), vec2(1.0,-1.0),
@ -19,7 +19,7 @@ void main()
vec2(1.41,1.41), vec2(-1.41,-1.41),
vec2(-1.41,1.41), vec2(1.41,-1.41)
};
);
vec2 bresl = textureSize(InputTexture,0);
vec2 bof = (1.0/bresl)*bssblurradius;
for ( int i=0; i<16; i++ ) res.rgb += texture(InputTexture,coord+ofs[i]*bof).rgb;

View file

@ -6,14 +6,14 @@ void main()
{
vec2 coord = TexCoord;
vec4 res = texture(InputTexture,coord);
vec2 ofs[8] =
{
vec2 ofs[8] = vec2[]
(
vec2(1.0,1.0), vec2(-1.0,-1.0),
vec2(-1.0,1.0), vec2(1.0,-1.0),
vec2(1.41,1.41), vec2(-1.41,-1.41),
vec2(-1.41,1.41), vec2(1.41,-1.41)
};
);
vec2 bresl = textureSize(InputTexture,0);
vec2 bof = (1.0/bresl)*bsssharpradius;
vec4 tcol = res;

View file

@ -51,9 +51,9 @@ void main()
int ph = 0, sh = 0;
float pv = 0.0, sv = 0.0;
bool usesh = false;
float hues[6] = {hshue_r,hshue_y,hshue_g,hshue_c,hshue_b,hshue_m};
float sats[6] = {hssat_r,hssat_y,hssat_g,hssat_c,hssat_b,hssat_m};
float vals[6] = {hsval_r,hsval_y,hsval_g,hsval_c,hsval_b,hsval_m};
float hues[6] = float[](hshue_r,hshue_y,hshue_g,hshue_c,hshue_b,hshue_m);
float sats[6] = float[](hssat_r,hssat_y,hssat_g,hssat_c,hssat_b,hssat_m);
float vals[6] = float[](hsval_r,hsval_y,hsval_g,hsval_c,hsval_b,hsval_m);
float v;
for ( float h=0.0; h<7.0; h+=1.0 )
{

View file

@ -5,8 +5,8 @@
void main()
{
#define d(x) x/64.0
float dither8[64] =
{
float dither8[64] = float[]
(
d( 0),d(48),d(12),d(60),d( 3),d(51),d(15),d(63),
d(32),d(16),d(44),d(28),d(35),d(19),d(47),d(31),
d( 8),d(56),d( 4),d(52),d(11),d(59),d( 7),d(55),
@ -15,7 +15,7 @@ void main()
d(34),d(18),d(46),d(30),d(33),d(17),d(45),d(29),
d(10),d(58),d( 6),d(54),d( 9),d(57),d( 5),d(53),
d(42),d(26),d(38),d(22),d(41),d(25),d(37),d(21)
};
);
#undef d
vec2 coord = TexCoord;
vec2 sfact = textureSize(InputTexture,0);