floooh / sokol-tools

Command line tools for use with sokol headers
MIT License
219 stars 54 forks source link

How to support samplerCube image/sampler object split #101

Closed zeromake closed 1 year ago

zeromake commented 1 year ago

https://github.com/floooh/sokol-tools/blob/master/CHANGELOG.md#16-jul-2023 only example sampler2D, how to support sampler3D, samplerCube?

uniform textureCube skybox_texture;
uniform sampler skybox_texture_smp;
void main() {
vec3 R = vec3(0);
texture(samplerCube(skybox_texture, skybox_texture_smp), R);
}
error: combined image sampler 'skybox_texture' detected, please use separate textures and samplers
uniform texture3D skybox_texture;
uniform sampler skybox_texture_smp;
void main() {
vec3 R = vec3(0);
texture(samplerCube(skybox_texture, skybox_texture_smp), R);
}
error: 'samplerCube' : sampler-constructor first argument must be a *texture* type matching the dimensionality and sampled type of the constructor
zeromake commented 1 year ago

I missed one more skybox_texture

uniform textureCube skybox_texture;
uniform sampler skybox_texture_smp;

samplerCube(skybox_texture, skybox_texture_smp)