0% found this document useful (0 votes)
6 views

Color Basics

The document provides an introduction to 3D rendering, focusing on pixel generation, color representation, and various rendering techniques such as MSAA and CPS. It discusses the role of APIs in graphics hardware communication and outlines different render target surface formats. Additionally, it covers blending techniques and the upcoming topics for future sessions.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Color Basics

The document provides an introduction to 3D rendering, focusing on pixel generation, color representation, and various rendering techniques such as MSAA and CPS. It discusses the role of APIs in graphics hardware communication and outlines different render target surface formats. Additionally, it covers blending techniques and the upcoming topics for future sessions.
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 19

Introduction to Pixel Pipe

 3D Rendering
 ​Why Color ? ​
• Color Jargons
Agenda • Render Target Surface Formats
• How is a Pixel generated ?​
• MSAA
• CPS
• Blending
• Topic to be covered in next session

2
Intel Confidential
3D Rendering

renderi pixel
ng s
Applicatio
n/
Content

Department or Event Name Intel Confidential 3


3D Rendering – API

• “Application Programming Interface”


• A common language for applications to talk to
graphics hardware, regardless of whose hardware
• Vulkan – cross platform API for high performance 3D
graphics and compute by AMD
• DirectX – dominant API on Microsoft Platforms,
DX12 ULTIMATE is the latest API
• OpenGL – open-source API for rendering of 2D and
3D graphics
• Metal –API created by Apple for 3D graphics and
compute

Department or Event Name Intel Confidential 4


3D Rendering – App to Screen

 App has, in memory, all the objects it might want to draw 3DApp
 App sends to the hardware (by way of the API and the driver) a particular object to

Native apps
be drawn

Web apps
• Where in memory to find it Browser
• A rough description of where it goes
• A description of how to paint it
 Hardware API
• Gets the description of the object from memory (Vertex Fetch)
• Computes where (in the world) the object is supposed to be (Vertex Shading)
• Computes where (on the screen) the object is supposed to be (Clip/Setup)
Driver
• Figures out what pixels make up the object (Rasterization)
• Tests whether the object is hidden behind something else (Depth Test)
• If not hidden
• Paints the pixels based on the description it got from the app (Pixel H/W
Shading)
• Writes the pixel color to the appropriate location in memory (PixelOut)
• Draws the image on the screen based on the colors written to memory
(Display
Department or Event NameEngine) Intel Confidential 5
Why Color ??
• A digital display with normal resolution  ~2 million pixels​
• Each pixel needs to have some color value for any image to be
visible onto the screen ​
• Each image is defined by an array of such pixels each with a
specific color value.​
• Each location of the pixel is given by (X,Y) coordinate on the graph ​
• Any bitmapped image (GIF) can be represented by giving the
location and value to each pixel

Department or Event Name Intel Confidential 6


Color Jargons

• Pixel : Picture Element, An Irreducible discrete unit of information in an image or picture ​


• Subspan : group of 2x2 pixels
• BPP : Bits per pixel – 8BPP/16BPP/32BPP/64BPP/128BPP surface formats supported
• MSAA : Multi Sampling Anti Aliasing
• CPS : Coarse Pixel Shading (a group of pixels are shaded as a single Coarse Pixel)​
• Pixel Pipe: screen-space hashed from PSS to NodeX and address hashed from XETLB to PBE
to L3 ​
• Screen space hash: a programmable hash function that maps (x,y) to a given pixel pipe ​
• Address space hash: GPU Virtual Address maps to the physical address space via XETLB

Department or Event Name Intel Confidential 7


How many Colors can
be represented ?
• RGBA, each with 8 bit channel, 256
brightness levels
• R8 – can have values from 0 to 255, 0 being
darkest to 255 being brightest level of red
• A – transparency factor – determines the
opacity of the image
• RGB  256X256X256 = ~ 16.8 million color
values
• RGBA Surface Formats represent the
precision of the Color Spectrum

Department or Event Name Intel Confidential 8


Render Target Formats
• Color supports 64 different Render target surface formats
• Supported RT formats - Xe2-Aspec-RCPBE

• Examples of RT formats for various BPP:


• 8 BPP - R8_UINT
• 16 BPP - R8G8_SNORM
- 16 bits per pixel. 8 bits per channel, Blue, Alpha absent
- Snorm : value lies between -1 and 1. Data stored in 2’s complement form. MSB is sign bit.
- Range of each channel : -127 to 127. snorm value U = integer Value / 127.
• 32 BPP - R16G16_UNORM
- 32bits per pixel, 16 bits per channel, blue and alpha are absent, Range of each channel – 0-65535
- UNORM value lies between 0 and 1
- integer value 65536= 1, UNORM Value = Integer Value/65536
• 64 BPP - R16G16B16A16_UNORM
• 128 BPP - R32G32B32A32_FLOAT
- R32G32B32A32_FLOAT
- 1 bit sign, 8 bits exp, 23 bits mantissa
- Range : (2 − 2−23) × 2127 ≈ 3.4028235 × 1038

• In the memory, the R channel data is stored in LSB, UNORM is stored in MSB

Department or Event Name Intel Confidential 9


How is a pixel generated ??

Department or Event Name Intel Confidential 10


How is a pixel generated ??

• Poly information is rasterized to pixels and hashed across


different slices by the Window Manager (WMunit)
• Each triangle must be rendered as pixels
• All pixels whose center is inside the triangle must be
determined
• Each attribute (position, texture, color) of each triangle
vertex must be interpolated at each pixel
• From WM-HIZ-IZ-PSD-EU-DAPRSS-PFE-PBE

Department or Event Name Intel Confidential 11


Aliasing
• Aliasing is a byproduct of using square dots (pixels) to display an image
• Consider a picture of a black diagonal line over a white background:

• As you can see-especially when zoomed in -- nature of these pixels creates a stair-
stepping effect, which is called aliasing.

Department or Event Name Intel Confidential 12


Multisample anti-aliasing (MSAA)

• Type of anti-aliasing, a technique used in computer graphics


to remove the edge/staircase effect.
• Higher the sampling mode smoother is the edge
• ELG/LNL can support 2X, 4X, 8X, 16X MSAA

Department or Event Name Intel Confidential 13


CPS
• Variable Rate Shading Feature in DX12 –
VRS_Microsoft_Doc
• Lower detailed areas of the frames can be shaded with
lower than pixel rate to save compute energy
• What if we shaded less frequently while keeping all the
coverage information? – That is the idea behind Coarse
Pixel Shading
• Achieve better battery life without significantly affecting
the image quality

Department or Event Name Intel Confidential 14


CPS

• Coarse Pixel Sizes: All ordered pairs in {1,2,4}


X {1,2,4}, e.g (2,4) means 2 pixels in X
direction and 4 pixels in Y direction get shaded
as one coarse pixel (CP)
• Example – 1x2 CP size with 4 samples per pixel
• The pixel shader will be executed once for the
group
• Pixel attribute is evaluated at the center of the
larger “coarse” pixel of size 1×2.
• The overall evaluated output replicates to all
the samples covered by the primitive.

Department or Event Name Intel Confidential 15


Blending
Blended Output = function(Source Color * Source Blend Factor , Destination Color *
Destination Blend Factor)
• Blending is enabled on a global basis by the Color Buffer
Blend Enable state variable (in COLOR_CALC_STATE)
• If there is no alpha value contained in the Color Buffer, a
default value of 1.0 is used and, correspondingly, there is no
alpha component computed by this function
• Destination color is the most current value of color, stored in
memory
• The color value is fetched from memory and blended with the
latest data from shader (Source data)
• B-spec link - Color Buffer Blending

Department or Event Name Intel Confidential 16


Color Buffer Blend Functions

Blend Function Operation (for each color component)


BLENDFUNCTION_ADD SrcColor*SrcFactor + DstColor*DstFactor

BLENDFUNCTION_SUBTRACT SrcColor*SrcFactor - DstColor*DstFactor

BLENDFUNCTION_REVERSE_SUBTRACT DstColor*DstFactor - SrcColor*SrcFactor

BLENDFUNCTION_MIN min (SrcColor*SrcFactor, DstColor*DstFactor)


Programming Note: This is a superset of
the OpenGL "min" function.

BLENDFUNCTION_MAX max (SrcColor*SrcFactor,


DstColor*DstFactor)
Programming Note: This is a superset of
the OpenGL "max" function.

Department or Event Name Intel Confidential 17


Questions ?

18
Intel Confidential
Topics to be covered

1. Slice hashing, Tiling


2. Generations of Pixel Pipe in Intel GPUs
3. Post EU Pixel Pipe ​Flow
4. Color Frontend – XE2 architecture
5. Color Backend ​– XE2 architecture
6. TRI001 Flow – in GRITS (output image) – Vikas ?
7. Debug flow

19
Intel Confidential

You might also like