defold / editor2-issues

DEPRECATED
44 stars 4 forks source link

Differences between editor and engine shader interpretations #810

Open subsoap opened 7 years ago

subsoap commented 7 years ago

Why is the in editor representation of the shader so much better looking than in engine? This is just a simple shader which make the color be the normal. I would prefer the engine to look like the editor.

_tools.zip

2017-05-11 21_03_28-defold editor 2 0 - deffx

2017-05-11 21_03_18-deffx

subsoap commented 7 years ago

Better looking method which is more consistent but this might still be worth looking at.

varying mediump vec2 var_texcoord0;
varying mediump vec3 var_position;
varying mediump vec3 var_normal;

void main() {

    gl_FragColor = vec4(normalize(var_normal) * 0.5 + 0.5, 1.0);
}

2017-05-12 19_19_44-deffx 2017-05-12 19_21_55-defold editor 2 0 - deffx - deffx_cameras_look-at script