SpaxscE / lscs_public

heavily modified recreation of GVP saber system for public use
6 stars 13 forks source link

add ability to create custom blade rendering function for crystals #36

Open SpaxscE opened 3 months ago

SpaxscE commented 3 months ago

Blade rendering is hardcoded. This can be made editable. See TODO entry: https://github.com/SpaxscE/lscs_public/blob/main/lua/weapons/weapon_lscs/cl_effects.lua#L218

BorpBorp commented 2 months ago

I haven't looked beyond far into it, but with the current rendering system, I don't think it's possible to render dark white values as the ALPHA multiplier just goes down rather than these values. Would this be possible with your new rework I presume being done eventually in the future?

SpaxscE commented 2 months ago

it can be done with custom textures. The ones i included are rendermode color additive so they act as light, and light can not be black. See

https://github.com/SpaxscE/lscs_templates_and_info/blob/main/lua/lscs/content/custom_blade.lua#L18-L21

https://github.com/SpaxscE/lscs_public/blob/main/materials/lscs/effects/lightsaber_blade.vmt#L5 https://github.com/SpaxscE/lscs_public/blob/main/materials/lscs/effects/lightsaber_glow.vmt#L4 image

https://github.com/SpaxscE/lscs_public/blob/main/materials/lscs/effects/lightsaber_core.vmt#L8 https://github.com/SpaxscE/lscs_public/blob/main/materials/lscs/effects/lightsaber_tip.vmt#L8 https://github.com/SpaxscE/lscs_public/blob/main/materials/lscs/effects/lightsaber_trail.vmt#L8

https://developer.valvesoftware.com/wiki/Render_Modes

image