# Noname 2.5 Shooter (Open source)

**URL:** <https://forum.defold.com/t/noname-2-5-shooter-open-source/57417>\
**Category:** Dev diaries\
**Created:** [July 12, 2019, 10:45pm UTC](https://forum.defold.com/t/noname-2-5-shooter-open-source/57417 "2019-07-12T22:45:21Z")\
**Posts on this page:** 1\
**Showing post:** 36

<div class="post-metadata">

**Author:** ![d954mas](https://forum-defold.b-cdn.net/user_avatar/forum.defold.com/d954mas/32/5401_2.png) [@d954mas](https://forum.defold.com/u/d954mas)\
**Post date:** [May 27, 2020, 6:39pm UTC](https://forum.defold.com/t/noname-2-5-shooter-open-source/57417/36 "2020-05-27T18:39:38Z")

</div>

Trying to add particles in 3d.

[https://forum-defold-uploads.b-cdn.net/original/3X/c/7/c7c06a760148b4d2daef119a7fe0f495db4c9021.mp4](https://forum-defold-uploads.b-cdn.net/original/3X/c/7/c7c06a760148b4d2daef119a7fe0f495db4c9021.mp4)

But particles can’t blend with each other.(depth test problem)  
If i disabled depth test for particles. It blend with each other ok. But  
have problems with other objects.  
Any ideas, how to fix?  
render script

```lua
function Render:render_3d()
	if (not self.targets.light_map) then return end
	local camera = CAMERAS.current

	render.set_viewport(camera.viewport.x, camera.viewport.y, camera.viewport.width, camera.viewport.height)
	render.set_view(camera:get_view())
	render.set_projection(camera:get_proj())

	render.enable_state(render.STATE_DEPTH_TEST)
	render.set_depth_func(render.COMPARE_FUNC_LEQUAL)

	render.enable_texture(1, self.targets.light_map, render.BUFFER_COLOR_BIT)

	render.set_depth_mask(true)
        --no transparent
	render.draw(self.predicates.wall, self.constants_buffers.light_map)

	render.enable_state(render.STATE_BLEND)
	render.set_blend_func(render.BLEND_SRC_ALPHA, render.BLEND_ONE_MINUS_SRC_ALPHA)

	render.disable_state(render.STATE_CULL_FACE)
        --all objects with transparent. Walls,enemies,objects, particles.
	render.draw(self.predicates.transparent3d, self.constants_buffers.light_map)

	if CONSTANTS.DEBUG.draw_physics then render.draw(self.predicates.debug_physics) end
	render.draw_debug3d()

	render.disable_state(render.STATE_DEPTH_TEST)
	render.enable_state(render.STATE_CULL_FACE)
	render.set_depth_mask(false)
	render.disable_texture(1)
end

```

---

_[View the full topic](https://forum.defold.com/t/noname-2-5-shooter-open-source/57417)._
