jzy3d / jzy3d-api

A Java API for 3d and 2d charts
BSD 3-Clause "New" or "Revised" License
282 stars 145 forks source link

Volume Rendering GLSL warning #219

Open jzy3d opened 2 years ago

jzy3d commented 2 years ago

When running BasicVolumeDemo, a warning is displayed at GLSL program validation step.

It is not a blocker but it is worth mentioning it due to #220 and #221

Ubuntu 20 on Dell OptiFlex

GLSLProgram: active samplers with a different type refer to the same texture image unit. 
../src/intel/isl/isl.c:2023: FINISHME: ../src/intel/isl/isl.c:isl_surf_supports_ccs: CCS for 3D textures is disabled, but a workaround is available.

MacOS 10.12

GLSLProgram: GLSL VALIDATION: Validation Failed: Sampler error:
GLSLProgram: GLSL VALIDATION: Samplers of different types use the same texture image unit.
GLSLProgram: GLSL VALIDATION: - or -
GLSLProgram: GLSL VALIDATION: A sampler's texture unit is out of range (greater than max allowed or negative).

MacOS 11.4

GLSLProgram: GLSL VALIDATION: Validation Failed: Sampler error:
GLSLProgram: GLSL VALIDATION: Samplers of different types use the same texture image unit.
GLSLProgram: GLSL VALIDATION: - or -
GLSLProgram: GLSL VALIDATION: A sampler's texture unit is out of range (greater than max allowed or negative).
jzy3d commented 2 years ago

Someone suggested

I think the shader code warning comes because of an ordering issue around when the glsl code is loaded and when the textures are init'd (so the shader code is initially pointing to the default texture), but its never executed in this state so its doesnt cause any issue (except the warning).