29 lines
810 B
C#
29 lines
810 B
C#
![]() |
|
||
|
using Godot;
|
||
|
|
||
|
namespace Rokojori
|
||
|
{
|
||
|
public class RDTexture: RenderingObject
|
||
|
{
|
||
|
public RDTexture( RokojoriCompositorEffect effect, Rid rid ):base( effect, rid ){}
|
||
|
|
||
|
public static RDTexture Create( RokojoriCompositorEffect effect, RDTextureFormat format, RDTextureView view )
|
||
|
{
|
||
|
return new RDTexture( effect, effect.rd.TextureCreate( format, view ) );
|
||
|
}
|
||
|
|
||
|
public static RDTexture Color( RokojoriCompositorContext context )
|
||
|
{
|
||
|
var rid = context.sceneBuffers.GetColorLayer( (uint) context.view );
|
||
|
|
||
|
return new RDTexture( context.effect, rid );
|
||
|
}
|
||
|
|
||
|
public static RDTexture Depth( RokojoriCompositorContext context )
|
||
|
{
|
||
|
var rid = context.sceneBuffers.GetDepthLayer( (uint) context.view );
|
||
|
|
||
|
return new RDTexture( context.effect, rid );
|
||
|
}
|
||
|
}
|
||
|
}
|