threejs3 [Three] Curious about the mind of AI Hello guys :) Today, I tried an interesting experiment. Recently, I've been studying AI and I've become interested in "embeddings". Here, embeddings refer to the artificial intelligence interpreting characters, images, or videos according to its own criteria and representing them as vectors. For example, when reading the character "Love," it transforms into numerous vectors like the following: [.. 2024. 1. 19. [Three.js] 텍스처가 깜빡이는 문제 안녕하세요 :) 오늘은 아래와 같이 구름 텍스쳐를 실험하다가 각도가 변경되면 텍스처가 깜빡거리거나 부분이 잘려 보이는 문제가 발생했습니다. 위에 보시면 어색하게 잘려있는 구름이 보이실 겁니다. 위 원인은 각 객체가 가지고 있는 depth 정보 때문인데요, 객체들은 depth 정보를 이용해 해당 객체를 그릴지 말지를 결정한다고 합니다. 렌더링 최적화에는 도움이 되겠지만 위처럼 겹겹이 쌓여있는 형태의 객체에선 오히려 나타나야할 부분이 잘려버리는 문제가 발생하네요. 해결방법은 간단합니다. material을 생성할때 depthWrite 키값으로 false를 넘겨주면 됩니다. const material = new THREE.MeshLambertMaterial({ map: textureMap, transparent.. 2023. 8. 18. [GLSL] 사각형 그리기 안녕하세요 :) 오늘은 The book of shaders를 정독하다가 아래와 같은 문제를 풀어보았습니다. Make another function that just draws the outline of a rectangle. 하루종일 업무를 보다가 쉬엄쉬엄 휴식할 겸 틀었는데 생각보다 쉽진 않을 듯합니다. ㅠㅠ 특히나 glsl은 디버깅이 쉽지 않아서 안에 들어가는 값을 머리속에 생각해야 하는 점이 더욱 진입장벽을 높이는 듯합니다. 각설하고 제가 만든 코드는 아래와 같습니다. vec3 rect( float borderWidth, vec2 blposition, vec2 trposition, vec2 st) { vec2 bl = (1.0-step(blposition, st) * step(blposition.y.. 2023. 7. 24. 이전 1 다음