mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-19 04:08:57 +02:00
[spv, vk] reworked texture view handling and added layer count overrides
This commit is contained in:
parent
93f4cccb76
commit
7b78b2dd1f
3 changed files with 99 additions and 26 deletions
|
|
@ -221,7 +221,12 @@ Id TextureSampleResultToFloat(EmitContext& ctx, const TextureDefinition& def, Id
|
|||
case SamplerComponentType::Sint:
|
||||
return ctx.OpConvertSToF(ctx.F32[4], color);
|
||||
case SamplerComponentType::Stencil:
|
||||
return ctx.OpConvertUToF(ctx.F32[4], color);
|
||||
{
|
||||
const Id converted{ctx.OpConvertUToF(ctx.F32[4], color)};
|
||||
const Id inv255{ctx.Const(1.0f / 255.0f)};
|
||||
const Id scale{ctx.ConstantComposite(ctx.F32[4], inv255, inv255, inv255, inv255)};
|
||||
return ctx.OpFMul(ctx.F32[4], converted, scale);
|
||||
}
|
||||
case SamplerComponentType::Uint:
|
||||
return ctx.OpConvertUToF(ctx.F32[4], color);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue