(01-31-2016, 11:04 PM)vlj Wrote: Rsx is fairly close to pc gpu. Of course some functions are not exposed by api but they're often deprecated (and thus can be emulated otherwise) or performance related, giving hints to the hardware but doesn't change the output.
Alpha kill belongs to the first category : it discards a pixel when some comparaison operation on pixel alpha value is true.
The feature is used by virtually every game today to mimic grass, hairs,... Based on alpha component (="transparency") of a texture. Instead of relying on a fixed function the discard operation is moved to the shader.
There is an alpha I'll feature on texture although I don't know how it works. It's likely similar but happen when a texture is sampled instead of waiting shader has finished execution.
I'm worried about per camera facing value ref/function settings since it's not supported by d3d (2 sided stencil can only accept different ops and mask) but no rendering technics I'm aware of use this so it's likely not very used.
The bare metal memory access is the difficult thing to emulate because all pc api wrap memory object but it's common to every device you want to emulate.
For the record, alphakill sample currently doesn't work properly. The cubes with alphakill are solid.