TAILIEUCHUNG - 3D Graphics with OpenGL ES and M3G- P36

3D Graphics with OpenGL ES and M3G- P36:Mobile phones are the new vehicle for bringing interactive graphics technologies to consumers. Graphics that in the 1980s was only seen in industrial flight simulators and at the turn of the millennium in desktop PCs and game consoles is now in the hands of billions of people. This book is about the technology underpinnings of mobile threedimensional graphics, the newest and most rapidly advancing area of computer graphics. | 334 LOW-LEVEL MODELING IN M3G CHAPTER 14 If the alpha test passes the depth test then compares the depth value of the fragment with the depth buffer at the screen location of the fragment. If the depth test passes the fragment will be written into the color and depth buffers. Depth testing in M3G is also simplified from OpenGL ES so that the test is hard coded to less than or equal GL_LEQUAL . That is fragments farther away than the existing depth buffer value are discarded. It is however possible to disable the depth test entirely with setDepthTestEnable false . Pixels in the frame buffer can then be overwritten even if they were closer to the camera than the fragments being drawn. Prior to depth testing you can optionally add an offset value to all fragment depth values similarly to glPolygonOffset shown in Section . This helps solve z-fighting problems that you may encounter with multi-pass rendering algorithms. The offset can be set with setDepthOffset float factor float units . Here factor is a multiplier for the maximum depth gradient and units the number of smallest resolvable depth buffer units to add. For example brings your geometry closer to the camera by an amount equal to one depth buffer unit plus the largest depth difference between two adjacent pixels in a triangle. The depth offset is constant for each individual polygon. For more details see Section . All fragments that pass the depth test are written to both the color buffer and the depth buffer by default but you can disable writing to either if you need to. Depth buffer writes are controlled with setDepthWriteEnable. Note that disabling depth writes does not disable the depth test and vice versa. Controlling color buffer writes is split between setColorWriteEnable and setAlphaWriteEnable. The RGB channels are lumped together and cannot be individually disabled the equivalent OpenGL ES call would be glColorMask colorWrite colorWrite colorWrite

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.