Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


oggs91

Member Since 01 Sep 2010
Offline Last Active Jun 24 2015 08:21 AM

Topics I've Started

Texturemap Rendering and Sampling

10 February 2015 - 01:44 PM

Suppose i have a model with given vertex colors and a texture parameterization. i then render all faces of the model to a texturemap with interpolated vertex colors. this results in a texturemap of the model ( image1 )

now i can render my model texturemapped, which results in image2 and image3

but as you can see, i have some troubles there with texture sampling. in image2 you see clearly some white sprinkles at texture seams. 

 

I think this comes through texture minification (while rendering the texturemapped model) and maybe also different rasterization, i can't exactly tell :/

 

My first solution was while drawing to the texturemap, first draw a wireframe prepass with increased linewidth, then overdraw the model ... indeed this reduced the problem, but some white sprinkles are still visible

 

how would you solve this?

other ideas:

draw without AA, inpaint algorithm for white pixels ( but i think this is too much work )

use texture with alpha, setting white pixels to invisible ( not sure if this would work ) also this is no robust solution if a renderer is used without alpha support

 

image1

K4Oo2TI.png

 

 

image2hkDStAv.png

 

 

image3

e7dWTUd.png

image4 - texturemap zoomed

jKsADSK.png


Deferred Rendering Demo

20 January 2015 - 01:29 AM

This is a demo we did for a realtime rendering course at university

I'd appreciate any feedback :)

 


glVertexAttribBinding()

20 September 2012 - 05:43 AM

http://www.opengl.or...n#Vertex_format


my question: why? what's the benefit of Example 2 ?
what's the difference of binding a buffer vs binding a buffer to a binding point ?
and is the vertex buffer binding from glBindVertexBuffer a VAO state ?

to render multiple vbo's with the same vertex layout i could use

glVertexAttribFormat(...)
glVertexAttribBinding(..., 0);
glVertexAttribFormat(...)
glVertexAttribBinding(..., 0);
glBindVertexBuffer(0,...) / draw / glBindVertexBuffer(0,...) / draw ... right ?

can i do the same with VertexAttributePointer ?
glVertexAttribPointer(...) glBindBuffer(...) draw() glBindBuffer(...) draw()


Example1
[source lang="java"]glBindBuffer(GL_ARRAY_BUFFER, buff);glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast<void*>(baseOffset + offsetof(position, Vertex)));glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, sizeof(Vertex), reinterpret_cast<void*>(baseOffset + offsetof(normal, Vertex)));glVertexAttribPointer(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(Vertex), reinterpret_cast<void*>(baseOffset + offsetof(color, Vertex)));[/source]

Example2
[source lang="java"]glBindVertexBuffer(0, buff, baseOffset, sizeof(sizeof(Vertex)));glVertexAttribFormat(0, 3, GL_FLOAT, GL_FALSE, offsetof(position, Vertex));glVertexAttribBinding(0, 0);glVertexAttribFormat(1, 3, GL_FLOAT, GL_FALSE, offsetof(normal, Vertex));glVertexAttribBinding(1, 0);glVertexAttribFormat(2, 4, GL_UNSIGNED_BYTE, GL_TRUE, offsetof(color, Vertex));glVertexAttribBinding(2, 0);[/source]

VAO and similar in OpenGLES2.0 on android

04 September 2012 - 12:55 AM

hi

first a question to VAO in general, far as i know the vao stores some client states ... all client states?
it stores the currently bound buffers enabledvertexattribpointers right?

Code to generate a VAO (from http://www.swiftless.com/tutorials/opengl4/4-opengl-4-vao.html)
glGenVertexArrays(1, &vaoID[0]); // Create our Vertex Array Object 
glBindVertexArray(vaoID[0]); // Bind our Vertex Array Object so we can use it 
 
glGenBuffers(1, vboID); // Generate our Vertex Buffer Object 
glBindBuffer(GL_ARRAY_BUFFER, vboID[0]); // Bind our Vertex Buffer Object 
glBufferData(GL_ARRAY_BUFFER, 18 * sizeof(GLfloat), vertices, GL_STATIC_DRAW); // Set the size and data of our VBO and set it to STATIC_DRAW 
 
glVertexAttribPointer((GLuint)0, 3, GL_FLOAT, GL_FALSE, 0, 0); // Set up our vertex attributes pointer 
 
glEnableVertexAttribArray(0); // Disable our Vertex Array Object 
glBindVertexArray(0); // Disable our Vertex Buffer Object 

in this example.. isn't there a glEnableVertexAttrib(0); missing ? ..to enable the vertexattribpointer


does anything similar to vao's exist on OpengGlES2.0 (Android) ?
... or what would be a good alternative ?

k minimum spanning trees

06 June 2012 - 10:40 AM

this is for a small project at university:

we have to implement a java algorithm which produces a k-minimum spanning tree on a given graph (a minimum spanning tree with k nodes)
further we have to solve this with an algorithm based on branch and bound

my problem is to get useful heuristics for upper and lower bounds, to eliminate soon a lot of problems

my current approch works as following:
lower bound:
weight of currently fixed #e edges in graph + one adjacent edge to them + the weights of the k-1-e smallest edges

upper bound:
currently only set if a valid solution was found

PARTNERS