1// license:BSD-3-Clause 2// copyright-holders:Ryan Holtz,ImJezze 3//============================================================ 4// 5// phosphor.json: Phosphor persistence shader for CRT 6// simulation. 7// 8//============================================================ 9{ 10 "blend": { 11 "equation": "add", 12 "srcColor": "srcalpha", 13 "dstColor": "1-srcalpha", 14 "srcAlpha": "srcalpha", 15 "dstAlpha": "1-srcalpha" 16 }, 17 "depth": { 18 "function": "always" 19 }, 20 "cull": { "mode": "none" }, 21 "write": { 22 "rgb": true, 23 "alpha": true 24 }, 25 "vertex": "chains/hlsl/vs_phosphor", 26 "fragment": "chains/hlsl/fs_phosphor", 27 "uniforms": [ 28 { "name": "s_tex", "type": "int", "values": [ 1.0 ] }, 29 { "name": "s_prev", "type": "int", "values": [ 1.0 ] }, 30 { "name": "u_passthrough", "type": "vec4", "values": [ 1.0, 0.0, 0.0, 0.0 ] }, 31 { "name": "u_phosphor", "type": "vec4", "values": [ 0.7, 0.7, 0.7, 0.0 ] } 32 ] 33}