Skip to content

Commit

Permalink
Add not_texture documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
darksylinc committed Jul 20, 2024
1 parent d356853 commit ea53a30
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
29 changes: 28 additions & 1 deletion Docs/src/manual/Migrating/Ogre4.0.Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,31 @@ Once that's done, most Hlms-related compiler errors (if setting [`OGRE_SHADER_CO

You should Find & Replace in that order. If you first find all `setProperty( ` and replace them with `setProperty( kNoTid, `; you will end up with code that compiles but introduces race conditions and no way to identify them.

However if you first find all `setProperty( ` and replace them with `setProperty( tid, `, you will end up with code that does not compile wherever `kNoTid` should be used (still exercise care when replacing `tid` with `kNoTid`, make sure to be conscious of it. See [The tid (Thread ID) argument](@ref HlmsThreading_tidArgument) for details).
However if you first find all `setProperty( ` and replace them with `setProperty( tid, `, you will end up with code that does not compile wherever `kNoTid` should be used (still exercise care when replacing `tid` with `kNoTid`, make sure to be conscious of it. See [The tid (Thread ID) argument](@ref HlmsThreading_tidArgument) for details).

## Compositor Script changes

Added the `not_texture` keyword. This can improve performance in scenarios where you don't intend to sample from this texture i.e. usually in conjuntion with either the `uav` or `explicit_resolve` keywords:

```
compositor_node RenderingNodeMsaa
{
in 0 rt_renderwindow
texture msaaSurface target_width target_height target_format target_orientation_mode msaa 4 not_texture explicit_resolve
rtv mainRtv
{
colour 0 msaaSurface resolve rt_renderwindow
}
target mainRtv
{
pass render_scene
{
}
}
out 0 rt_renderwindow
}
```
9 changes: 7 additions & 2 deletions Docs/src/manual/Scripts/compositor.md
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,7 @@ Also setting Textures that are RenderTargets is dangerous. For RenderTargets, ch
```cpp
texture <name> <width> <height> [depth] <pixel_format> [msaa <N>] [msaa_auto]
[depth_texture] [depth_pool <poolId>] [uav] [2d_array|3d|cubemap] [mipmaps <numMips>] [no_automipmaps] [reinterpretable]
[explicit_resolve]
[explicit_resolve] [not_texture]
```

@param name
Expand Down Expand Up @@ -2100,7 +2100,12 @@ The reinterpretation must be supported by the GPU and API.
@param explicit\_resolve

When absent (default), MSAA textures will have an extra non-MSAA copy where the contents are always resolved (unless store actions are not set to resolve).<br/>
When present, there is no extra copy; and you must setup the RTV manually with a different non-MSAA texture where to resolve to. See [MSAA with Explicit Resolves](@ref MSAAExplicitResolves)
When present, there is no extra copy; and you must setup the RTV manually with a different non-MSAA texture where to resolve to. See [MSAA with Explicit Resolves](@ref MSAAExplicitResolves).

@param not\_texture

When absent (default), the texture can be bound as a regular texture for sampling (e.g. with point/bilinear filtering).
When present, you can't sample from this texture. This flag is useful if you intend to use it together with uav or explicit\_resolve.

### MSAA: Explicit vs Implicit resolves {#CompositorNodesTexturesMsaa}

Expand Down

0 comments on commit ea53a30

Please sign in to comment.