Summary

Used to render to the screen using your Graphics Card, or whatever you kids are using in your crazy future computers. Whatever it is I'm sure it isn't fungible and everyone has free money and no-one has to ever work.

Static Properties

Attributes Access to the current render context's attributes. These will be used to set attributes in materials/shaders. This is cleared at the end of the render block.
CameraPosition The camera position of the currently rendering view
CameraRotation The camera rotation of the currently rendering view
CameraTransform The camera transform of the currently rendering view
FieldOfView The field of view of the currently rendering camera view, in degrees.
IsActive If true then we're currently rendering and you are safe to use the contents of this class
LayerType The current layer type. This is useful to tell whether you're meant to be drawing opaque, transparent or shadow. You mainly don't need to think about this, but when you do, it's here.
RenderTarget Get or set the current render target. Setting this will bind the render target and change the viewport to match it.
Viewport In pixel size, where are we rendering to?

Static Methods

Blit Draw a screen space quad using the passed material. Your material should be using a screenspace shader so it will actually render to the screen and not in worldspace at 0,0,0
Clear Clear the current drawing context to given color.
CopyTexture Copies pixel data from one texture to another on the GPU. This does not automatically resize or scale the texture, format and size should be equal.
Draw
DrawIcon Calls DrawText with "Material Icons" font. You can get a list of icons here https://fonts.google.com/icons?selected=Material+Icons
DrawModel Draws a single model at the given Transform immediately.
DrawModelInstanced
DrawModelInstancedIndirect Draws multiple instances of a model using GPU instancing with the number of instances being provided by indirect draw arguments. Use `SV_InstanceID` semantic in shaders to access the rendered instance.
DrawQuad Draw a quad in screenspace
DrawRoundedRectangle Draw a rounded rectangle, with optional border, in Material.UI.Box
DrawText Draws a text quad in screenspace using the Material.UI.Text material.
GenerateMipMaps Generate the mip maps for this texture. Obviously the texture needs to support mip maps.
GrabDepthTexture Grabs the current depth texture and stores it in targetName on renderAttributes.
GrabFrameTexture Grabs the current viewport's color texture and stores it in targetName on renderAttributes.
MeasureText Measure how big some text will be, without having to render it
Render
RenderToTextureobsolete Render this camera to the specified texture target
ResourceBarrierTransition Executes a barrier transition for the given GPU Texture Resource. Transitions the texture resource to a new pipeline stage and access state.
SetupLighting Setup the lighting attributes for this current object. Place them in the targetAttributes
people
Log in to reply
You can't reply if you're not logged in. That would be crazy.