Most Popular

1500 questions
9
votes
1 answer

There are many shading languages built on top of GLSL or HLSL - what problems do they typically solve, and what worthwhile advancements do they make?

Whew, that was a long title. Either way, I'm asking this question, since I like to think about various things, and it occurred to me that there isn't really any simple, open source layers on top of GLSL, even if only to add simple things such as…
Llamageddon
  • 931
  • 2
  • 7
  • 13
9
votes
1 answer

Why different result when change input order in GL_LINES?

Code: #include #include #pragma comment(lib, "opengl32") #include #include //Initialize OpenGL void init(void) { glClearColor(0, 0, 0, 0); glViewport(0, 0, 500, 500); …
zombielei
  • 121
  • 1
  • 3
9
votes
1 answer

Calculate aspect ratio from 2D shape in 3D space

Given the 4 coordinates of a 2D shape in a 3D space I want to calculate its aspect ratio. The 3D space is created with 2 vanishing points. The 4 coordinates - marked blue - are the 2D coordinates on the display. in the example they should be roughly…
succcubbus
  • 193
  • 6
9
votes
1 answer

Function to convert HSV angle to RYB angle

I'm trying to create a RYB color wheel with a smooth-looking gradient across the RYB spectrum. The angles of the HSV wheel are incorrect (yellow at 60deg instead of 120deg etc). If I just do a few linear transformations the results is still not…
Escher
  • 423
  • 3
  • 8
9
votes
1 answer

Perturbed image texture implementation from renderman language

I am trying to implement (in C#) an image perturbation algorithm presented in the book "Texturing and modeling - K. Perlin et al" (page 91 if anyone has it), which distorts an image. The following code is in Renderman language: The texture access Ct…
simog
  • 91
  • 3
9
votes
1 answer

Are draw calls executed in parallel or sequentially or both?

This a follow up for a question I answered on GameDev SE. The question was simply Is glDrawArraysInstanced in OpenGL parallel when drawing those instances? My answer was in the lines of "the GPU might execute multiple draw calls in parallel…
concept3d
  • 243
  • 2
  • 8
9
votes
2 answers

What does it mean by a Constraint-based Graphics System?

Scratchpad was a constraint-based graphics system. What does it mean by a Constraint-based Graphics System?
user464
9
votes
3 answers

How to combine rotation in 2 axis into one matrix

I already know about the matrices I have to use in order to perform rotations. If I have to rotate in z-axis and then in x-axis, I would do it in 2 steps. My question is, is it possible to combine both rotations into a single matrix? I will…
JORGE
  • 261
  • 1
  • 2
  • 3
9
votes
1 answer

Does PBR incur a performance penalty by design?

I am wondering if the various PBR models used in modern game engines for real time are heavier in terms of computation, that more classic approaches to rendering. Worded differently, is PBR just a different way to organize one's rendering pipeline,…
9
votes
1 answer

Help me find out what this texture mapping technique is called

I'm in the process of making a tool that requires rendered texture to follow the contours of a piece of clothing. An example would be this website https://knyttan.com/editor/jumper-editor/. The effect here is achieved by using a colour map: I looked…
9
votes
3 answers

How can I create a bounding volume hierarchy for constantly moving objects?

I'd like to be able to render a large population of small independently moving objects in real time. They may move in a swarm-like manner, but their relative positions will not be coherent - their position may change arbitrarily within a swarm and…
9
votes
2 answers

Does UV-mapping generate for some points of the 3D model several points in the 2D projection?

Assume my 3D model is a pyramid with a rectangular base and I numerate four corners of the base with 1, 2, 3, 4 and give 5 to the top point. If I project this pyramid into a 2D star-shaped object, would not all four outer points of the star be…
9
votes
1 answer

Can we use anisotropic filtering on 3D textures?

Do modern GPUs support anisotropic filtering for 3D textures? If yes, how can one use it? The OpenGL spec doesn't seem to be very precise on this. From this link: Should anything particular be said about anisotropic 3D texture filtering? Not…
ap_
  • 2,204
  • 1
  • 18
  • 27
9
votes
3 answers

How does the view-independence of radiosity increase the calculations involved?

In the style of trichoplax' question, I want to talk about yet another Wikipedia article: Radiosity (computer graphics). The article states: Radiosity is viewpoint independent, which increases the calculations involved, but makes them useful for…
David Kuri
  • 2,293
  • 13
  • 32
9
votes
1 answer

Rendering fog underneath water

I'm aware of glFog, which blends between the fog and surface colour based on distance to the camera, like this: The equations are even given in the docs. But the fog is applied immediately in front of the camera. I'm trying to render a water…
jozxyqk
  • 669
  • 5
  • 16