Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define HEIGHT 1.8
- #define WIDTH 2.5
- #define BH 0.7
- #define BW1 0.7
- #define BW2 0.14
- #define R 0.2
- #define W 0.1
- const vec4 WHITE = vec4(1.0, 1.0, 1.0, 1.0);
- const vec4 BLUE = vec4(0.0078431372549019607843137254902, 0.32156862745098039215686274509804, 0.61176470588235294117647058823529, 1.0);
- const vec4 RED = vec4(0.86274509803921568627450980392157, 0.11764705882352941176470588235294, 0.2078431372549019607843137254902, 1.0);
- const ivec2 DIMENSIONS = ivec2(1280, 922);
- glsl vec4 IcelandicFlag ( vec2 coord ) {
- vec2 pos = vec2( WIDTH, HEIGHT ) * coord;
- if ( pos.x >= BW1+W && pos.x <= BW1+W+R || pos.y >= BH+W && pos.y < BH +W+R ) {
- return RED;
- } else if ( pos.x >= BW1 && pos.x <= BW1 + W + R + W || pos.y >= BH && pos.y <= BH + W + R + W ) {
- return WHITE;
- }
- return BLUE;
- }
- image Iceland = glsl(IcelandicFlag, DIMENSIONS);
- param float diffFactor = 1.0 : logrange (1.0, 256.0);
- //image Reference = file();
- glsl vec3 Compare(vec2 coord) {
- vec3 a = texture( Reference, coord ).rgb;
- vec3 b = texture( Iceland, coord ).rgb;
- return diffFactor * abs( b - a );
- }
- //image Differance = glsl(Compare, DIMENSIONS);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement