• Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

1152 Excellent


About Jihodg

  • Rank

Personal Information

  • Interests
  1. as it was said before by swiftcoder, don't really know why you need another context just for offscreen rendering... multiple contexts are useful to do some basic multithreading in opengl, but in that case, you would just have one context per thread and that context is always current in that particular thread, so no context switching is needed
  2. OpenGL GLSL Light structure

    if you are using uniform blocks you must use layout( std140 ) or layout( shared ) to ensure the compiler will not optimize away unused uniforms
  3. 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
  4. 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
  5. 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.
  6. 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
  7. 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!
  8. 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
  9. 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.
  10. 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
  11. 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.
  12. 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!
  13. 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 ;)
  14. 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)
  15. 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.
  • Advertisement