Resize cube example crashed
happydpc opened this issue · comments
Here is the failed info, when resize the skybox may need to recreate.
thread '' panicked at 'assertion failed: (left == right)
left: Extent { width: 1280, height: 960, depth: 1 }
,
right: Extent { width: 1280, height: 963, depth: 1 }
: Extent state must match extent from view'
Yes, it's ok now.
@happydpc Yeah that is a known issue I'm currently re-writing the skybox stuff in a separate branch, but our asset loading is a higher priority atm.
That is another known issue! Essentially the shader doesn't know that it needs to not use the texture. We need to come up with a soultion for this. Some research needs to be done to figure out how we can work in compile time configurations. The other thing we could do is pass in more uniform data to tell the shader that we don't have a texture.
This code here:
https://github.com/StarArawn/harmony/blob/master/assets/core/shaders/pbr_fragment.glsl#L145
should look more like:
if hasTexture {
main_color = texture(sampler2D(main_map, tex_sampler), i_uv).rgb * color.rgb;
} else {
main_color = color.rgb;
}
Yes, there needs some auto switch. Thank you for your tip. Can't wait to test the asset loading. Good job.