jvm-graphics-labs / jogl-samples

The Java OpenGL Samples Pack
MIT License
41 stars 16 forks source link

Gl_400_fbo_multisample, Gl_430_direct_state_access_ext, Gl_400_texture_derivative #7

Open elect86 opened 8 years ago

elect86 commented 8 years ago

C and Java fails.

Shader status invalid: 0(20) : error C5229: Argument 1 for interpolateAtSample must have no component selection

OpenGL Error(GL_INVALID_OPERATION): initProgram

Same for interpolateAtOffset

probabily nvidia glsl compiler bug

elect86 commented 8 years ago

Temporary fix (valid only for interpolateAtSample)

this means only for gl-400-fbo-multisample and gl-430-direct-state-access-ext

in vert
{
    vec2 Texcoord;
    //sample vec2 Texcoord;
} Vert;

layout(location = FRAG_COLOR, index = 0) out vec4 Color;

void main()
{
    Color = texture(Diffuse, interpolateAtSample(Vert.Texcoord, gl_SampleID));
    //Color = texture(Diffuse, Vert.Texcoord);
}
elect86 commented 8 years ago

interpolateAtSample works on linux, although through recompilation..

GlDebugOutput.messageSent(): GLDebugEvent[ id 0x20092
    type Warning: implementation dependent performance
    severity Medium: Severe performance/deprecation/other warnings
    source GL API
    msg Program/shader state performance warning: Fragment Shader is going to be recompiled because the shader key based on GL state mismatches.
    when 1455173070857
    source 4.5 (Core profile, arb, debug, compat[ES2, ES3, ES31], FBO, hardware) - 4.5.0 NVIDIA 352.79 - hash 0x83be6b]