Panda3D/Manual/O alpha test: diferenças entre revisões

[edição não verificada][edição não verificada]
Conteúdo apagado Conteúdo adicionado
Criou nova página com 'Alpha Testing The alpha test attribute governs whether or not a part of a node will be rendered based on the alpha value of its texture. This is particularly useful for ren...'
 
Sem resumo de edição
Linha 1:
'''Teste Alfa'''
Alpha Testing
 
O atributo teste alfa governa se uma parte de um nodo vai ou não ser renderizada baseado em um valor alfa de sua textura. Isso é particularmente util para renderizar geometria complexa em um buffer de profundidade ou stencil com um cartão texturizado, ao inves de explicitamente criar formatos
The alpha test attribute governs whether or not a part of a node will be rendered based on the alpha value of its texture. This is particularly useful for rendering complex geometry into the depth or stencil buffer with a textured card rather than explicitly creating the shapes.
 
Esse teste é diferente de renderizar com respeito ao valor de transparencia alfa. Se voce setar um atributo de teste alfa no nodo que esta renderizando no buffer de cor, voce pode se surpreender com o resultado. Todos os pixels que passaram no teste serao renderizados como se nenhum teste tivesse sido performado, incluindo sua transparecnia apropriada e pixels que falharam no teste nao serao renderizados.
This test is different from rendering with respect to alpha transparency value. If you set an alpha test attribute on a node which is rendering into the color buffer, you may be surprised by the result. All pixels that pass the alpha test will be rendered just as if no test had been performed, including their appropriate transparency and pixels that fail the test will not be rendered at all.
 
Lembre-se de setar sua prioridade de atributo para sobrepor qualquer atributo de teste alfa herdado de um grafo de cena superior.
Remember to set your attribute's priority to override any other alpha test attributes inherited from higher in the scene graph.
 
No exemplo seguinte, nos criamos um atributo que pode fazer objetos serem renderizados apenas se o valor alfa deles for menos que um quarto da intensidade
In the following example, we create an attribute that would cause objects to render only if their alpha value is below one quarter intensity.
 
lowPassFilter = AlphaTestAttrib.make(RenderAttrib.MLess,0.25)
 
E agora, esse atributo pode ser adicionado ao nodo para habilitar a ação.
And now, this attribute can be added to a node to enable the action.
 
nodePath.setAttrib(lowPassFilter)
 
'''Sessão Incompleta'''
Incomplete Section
 
'''Nota: está sessão esta incompleta, e segundo os criadores do manual original sera atualiada em breve.'''
Note: this section is incomplete. It will be updated soon.