Jihodg

Members
  • Content count

    34
  • Joined

  • Last visited

Community Reputation

1152 Excellent

2 Followers

About Jihodg

  • Rank
    Member

Personal Information

  • Interests
    Art
    Design
    Programming
  1. yep!... it is quite simple actually... you just have to think that the padding goes before the given type to produce the proper alignment of the variable or struct, instead of going after it as a filling!... float is aligned to 4 bytes, float2 aligned to 8 bytes, while both float3 and float4 aligned to 16 bytes
  2. If vulkan rules are anything like opengl, your problem is probably in your last line! You have a bool followed by a float3... the float3 alignment rules would make it to add 3 units (12 bytes) padding following the bool value! float3 followed by a float = 12 bytes + 4 bytes (float3 are aligned to 16 bytes and float to 4), but... float followed by float3 = 4 bytes + 12 bytes padding + 12 bytes + 4 bytes padding
  3. I don't exactly understand the method you are using... but I am guessing is very constrained to your specific use case, like a plane as a low poly version on a more detailed displaced version of it in just one axis. In the general case, the low poly and high poly models don´t have the same topology, and thus, they don´t share the same uv space... in fact, many times the high poly version of a model isn´t even uv unwrapped.
  4. Catmull-Clark works on any convex polygon (including triangles), but it is better suited to quads and produces all quads after just one iteration. For triangular meshes usually Loop subdivision can be better and it produces a triangular mesh. There is also the old ATI/AMD gpu friendly PN triangles subdivision.   PS: some references! http://graphics.stanford.edu/courses/cs468-10-fall/LectureSlides/10_Subdivision.pdf https://www.cise.ufl.edu/research/SurfLab/papers/00ati.pdf
  5. unfortunatelly I can't test it right now because of my old directX 10 class hardware, but is always nice to see someone sharing some little and usefull tools and some source code... thanks!
  6. Alpha blend mystery

    I haven't seen the code... but you could disable the use of mipmaps as a quick check if there lies the problem
  7. There is no need to use freetype in java, since java already include functions to open fonts and render text or character to an image. After that you just need to decide how are you going to render your text in opengl... if it is mostly static strings (text that doesn't change often) you could just use java to generate an image of the complete string and copy that to an opengl texture and render it as a single quad, but if you have lots of changing string you would better do the common method of rendering all the characters needed to an image, moving it to a texture, and render a quad per character. Basically it is all standard text rendering in opengl like in any other language, the only difference is the glyph (character) rendering and truetype font processing, in this case using java existing methods.
  8. If it is just one triangle you can simply rotate the triangle by the angle difference between the triangle plane normal and the normal of the target plane, and translate/scale if necessary... but for complex meshes there is no quick and simple way of doing an efficient uv unwrapping, except for very specific cases... maybe you could look at something like this: http://alice.loria.fr/publications/papers/2002/lscm/lscm.pdf
  9. fuzzy fonts

    well, judging by the window caption on your screenshot, you may be used, or even prefer viewing small fonts with no antialiasing whatsoever... which will obviously produce a crisp and sharp rendering of the glyphs, but with more visible jaggies on curved features.
  10. fuzzy fonts

    Actually, that does look like a properly hinted and anti-aliased text rendering for that size... the real problem with it is that it is drawn naively, without using the correct gamma. If you apply a 2.2 gamma correction to that image you will see way better consistency on rounded shapes. Also at small resolutions it can be good to use sub-pixel anti-aliasing, aka clear-type on Windows, but that is another story!
  11. Material Layering

    You can't say that, because look at photoshop, each layer is blended after, same for animation, each layer is blended.     and following your photoshop analogy, the input to the material system are not the layers per se, but the result of flattening all the layers to a single image (texture), again making the name of "layers" kind of deceptive ;)
  12. Material Layering

    I think layers is kind of a bad name for what they are really doing... it is just material blending!... their material model uses a unified BRDF lighting equation controlled by a series of blendable parameters usually in the range 0 to 1, this parameters are stored in a texture(s) and processed in a single pass. Since there are parameters controlling if the material is plastic or metal, its roughness and such different materials are achieved. (with the name layers I would think more of a system where the result of the last material layer is input of the next)
  13. I haven't fully read the paper yet... but so far it looks really good, well written with right to the point information, nice figures, and it's great that you also included videos and source. And your results are just perfect! congratulations! and big thanks for sharing.
  14. I can't be sure from the screenshot, but it seems to me that the face culling order could be wrong... try changing your front face setting from clockwise to counter clockwise, or biseversa
  15. OpenGL 2D Color lighting in OpenGl2 ES2

    when rendering your lights, instead of using glBlendFunc(GL2ES2.GL_ONE, GL2ES2.GL_ONE) use glBlendFunc(GL2ES2.GL_ONE, GL2ES2.GL_ONE_MINUS_SRC_COLOR)... that should reduce the saturation, and with it, a better color blending   hahaha funny thing is, as you can see in your second image there is much better blending and no saturation!... because coincidentally you used blue and yellow and thus not saturated any channel, one light hay no blue channel while the other has only blue channel... of course that didn't happen when you mixed two white lights or a white and a yellow one