Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple textures and samplers #30

Open
ppenenko opened this issue Jun 29, 2023 · 0 comments
Open

Decouple textures and samplers #30

ppenenko opened this issue Jun 29, 2023 · 0 comments
Assignees

Comments

@ppenenko
Copy link
Owner

Currently, for the purposes of the glTF Demo, the HLSL generator exposes a method to
define a "combined" 2D sampler together with a texture:

def combined_sampler_2d(

DX12's native textures and samplers, however, are defined separately and are combined at shading time in a sample call. Vulkan supports this pattern too. Decoupling textures and samplers in Metashade will make it possible to decouple texture-specific functionality (native texel type, dimensions, multisampledness) from sampler properties (LOD, bias, the compare behavior).

In particular, this will enable cube map textures which are required for IBL in the glTF Demo.

@ppenenko ppenenko self-assigned this Jun 29, 2023
ppenenko added a commit that referenced this issue Sep 22, 2023
ppenenko added a commit that referenced this issue Sep 22, 2023
ppenenko added a commit that referenced this issue Sep 22, 2023
ppenenko added a commit that referenced this issue Sep 23, 2023
* Baby steps on decoupling textures and samplers

* Unit test for the desired sampler/texture API

* #30: WIP on textures and samplers derived from `BaseType`

* #30: new, uniforms-based API, fixes in the unit test

* #30: fixed combined samplers

* #30: texture and sampler uniform registers

* #30: fixed compare samplers

* Fixed the check for cbuffers reusing registers

* Simplified the check for uniform register reuse

* #30: Uniform register reuse check for samplers and textures

* Fixed a minor bug

* #30: Testing register reuse check for samplers

* #30: removed `combined_sampler_2d`

* #30: ability to pass pre-constructed variables to uniform definitions

* #30: ported the glTF Demo to the new sampler/texture API
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant