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

3D Graphics with OpenGL ES and M3G- P24: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. | 214 OPENGL ES RASTERIZATION AND FRAGMENT PROCESSING CHAPTER 9 PIXEL TESTS Toward the end of the graphics pipeline the pixels are subjected to a sequence of tests. The first of the tests is the scissor test which allows only pixels within a rectangular box to pass. This is followed by alpha stencil and depth tests. All of these tests compare one component of the pixel . the alpha stencil or depth component to a reference value. The comparison function can be set to always pass the pixel GL_ALWAYS never pass it GL_NEVER or pass depending on the relative value of the component with respect to the reference value GL_LESS GL_LEQUAL GL_GREATER GL_GEQUAL GL_EQUAL or GL_NOTEQUAL . SCISSORING The scissor test if enabled allows only pixels within the scissor box to be modified by drawing commands. The scissor box is defined by calling void glScissor GLint x GLint y GLint width GLint height By default the scissor test is not enabled. The scissor box is defined by giving the lower left corner followed by the width and height in pixels. For example glEnable GL_SCISSOR_TEST glScissor 10 5 100 200 defines a scissor box starting from 10 5 and extending to 110 205 . If the scissor box is not enabled the result is the same as if the box covered the entire window. Changing the scissor box may require flushing the graphics pipeline so it is advisable to set it up only in the beginning of the frame. ALPHA TEST The next test after the scissor test is the alpha test. It discards incoming fragments based on a comparison between the fragment s alpha value and a reference value. This can be useful when combined with alpha blending as it can be used to skip the rest of the pipeline when completely transparent texels are encountered in a texture map. Alpha test is a relatively cheap operation even in software implementations of OpenGL ES and if a texture contains many discardable texels using it can even accelerate the rendering. void glAlphaFunc GLenum func GLclampf ref .

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.