Skip to main content
added 21 characters in body
Source Link
Lasse
  • 3.2k
  • 2
  • 21
  • 31

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation)with a process that is called rasterization. Rasterization basically generates fragments using the triangle's corners and give each fragment an interpolated value using the values in the vertices, produced by a vertex shader.

Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle.

With certain projection configuration thisThis will produce a triangle which covers half of the screen, which at 1920x1200 resolution will be 1920*1200/2 fragments. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

If vertices send some properties to the fragments (like a colour), they get interpolated across the surface of the triangle to all the fragments.

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation). Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle.

With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution will be 1920*1200/2 fragments. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

If vertices send some properties to the fragments (like a colour), they get interpolated across the surface of the triangle to all the fragments.

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices with a process that is called rasterization. Rasterization basically generates fragments using the triangle's corners and give each fragment an interpolated value using the values in the vertices, produced by a vertex shader.

Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle.

This will produce a triangle which covers half of the screen, which at 1920x1200 resolution will be 1920*1200/2 fragments. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

deleted 72 characters in body
Source Link
Lasse
  • 3.2k
  • 2
  • 21
  • 31

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation). Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle.

With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution and back faces culled will be 1920*1200/2 fragments. Without back face culling, it will be twice that. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

If vertices send some properties to the fragments (like a colour), they get interpolated across the surface of the triangle to all the fragments.

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation). Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle.

With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution and back faces culled will be 1920*1200/2 fragments. Without back face culling, it will be twice that. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

If vertices send some properties to the fragments (like a colour), they get interpolated across the surface of the triangle to all the fragments.

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation). Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle.

With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution will be 1920*1200/2 fragments. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

If vertices send some properties to the fragments (like a colour), they get interpolated across the surface of the triangle to all the fragments.

added 77 characters in body
Source Link
user1430
user1430

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation). Let's say that you have a triangle abcABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Now dependingDepending on the resolution, this generates some amount of fragments covering the whole triangle. 

With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution and back faces culled will be 1920*1200/21920*1200/2 fragments. Without back face culling, it will be twice that. The amount of fragments increase with every triangle you draw.

A fragment is not a pixelA fragment is not a pixel. It is much more. http://en.wikipedia.org/wiki/Shader#Simplified_graphic_processing_unit_pipeline

If vertices send some properties to the fragments like(like a colour), they get interpolated across the surface of the triangle to all the fragments.

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices. Let's say that you have a triangle abc like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Now depending on the resolution, this generates some amount of fragments covering the whole triangle. With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution and back faces culled will be 1920*1200/2 fragments. Without back face culling, it will be twice that. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more. http://en.wikipedia.org/wiki/Shader#Simplified_graphic_processing_unit_pipeline

If vertices send some properties to the fragments like a colour, they get interpolated to all the fragments.

Vertex shaders gets called a lot less than fragment shaders. It's because the fragments get generated from the vertices (by interpolation). Let's say that you have a triangle ABC like this:

a = 0,0,0 
b = 1,0,0 
c = 1,1,0

Depending on the resolution, this generates some amount of fragments covering the whole triangle. 

With certain projection configuration this will produce a triangle which covers half of the screen, which at 1920x1200 resolution and back faces culled will be 1920*1200/2 fragments. Without back face culling, it will be twice that. The amount of fragments increase with every triangle you draw.

A fragment is not a pixel. It is much more.

If vertices send some properties to the fragments (like a colour), they get interpolated across the surface of the triangle to all the fragments.

added 95 characters in body
Source Link
Lasse
  • 3.2k
  • 2
  • 21
  • 31
Loading
Source Link
Lasse
  • 3.2k
  • 2
  • 21
  • 31
Loading