[00:10:36] *** marijnfs__ <marijnfs__!~marijnfs@x4d071208.dyn.telefonica.de> has quit IRC (Read error: Connection reset by peer)
[00:29:08] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has joined ##vulkan
[00:55:30] *** glYoda <glYoda!~MTLYoda@c-73-25-27-206.hsd1.or.comcast.net> has quit IRC (Ping timeout: 246 seconds)
[02:03:22] *** haasn <haasn!~haasn@HSI-KBW-085-216-096-210.hsi.kabelbw.de> has quit IRC (Ping timeout: 245 seconds)
[02:03:33] *** haasn` <haasn`!~haasn@HSI-KBW-085-216-096-210.hsi.kabelbw.de> has joined ##vulkan
[02:12:20] *** R2robot <R2robot!~R2robot@unaffiliated/r2ro> has quit IRC (Quit: Pull the lever, Kronk. Wrong leverrrrrrr!)
[02:16:02] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has quit IRC (Quit: This computer has gone to sleep)
[02:18:30] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has joined ##vulkan
[02:22:02] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has joined ##vulkan
[02:24:20] *** R2robot <R2robot!~R2robot@unaffiliated/r2ro> has joined ##vulkan
[02:26:49] *** stamina <stamina!~stamina@247-187-128-083.dynamic.caiway.nl> has quit IRC (Quit: WeeChat 2.4)
[02:35:05] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[02:42:12] *** ratchet_freak <ratchet_freak!~ratchetfr@ptr-82s3g7l9r42569r41f4.18120a2.ip6.access.telenet.be> has quit IRC (Ping timeout: 258 seconds)
[02:57:17] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has quit IRC (Quit: This computer has gone to sleep)
[03:17:36] *** LunarJetman2 <LunarJetman2!LunarJetma@5ec16e1a.skybroadband.com> has quit IRC (Ping timeout: 250 seconds)
[05:24:44] *** glYoda <glYoda!~MTLYoda@c-73-25-27-206.hsd1.or.comcast.net> has joined ##vulkan
[08:26:06] *** karroffel <karroffel!~karroffel@ip-178-203-190-17.hsi10.unitymediagroup.de> has quit IRC (Quit: Ping timeout (120 seconds))
[08:26:36] *** karroffel <karroffel!~karroffel@ip-178-203-190-17.hsi10.unitymediagroup.de> has joined ##vulkan
[08:38:58] *** ratchet_freak <ratchet_freak!~ratchetfr@ptr-82s3g7l9r42569r41f4.18120a2.ip6.access.telenet.be> has joined ##vulkan
[08:41:29] *** emersont1 <emersont1!~emersont1@host109-154-50-137.range109-154.btcentralplus.com> has joined ##vulkan
[08:43:18] *** ratchet_freak <ratchet_freak!~ratchetfr@ptr-82s3g7l9r42569r41f4.18120a2.ip6.access.telenet.be> has quit IRC (Ping timeout: 258 seconds)
[08:47:33] *** RicardasSim <RicardasSim!~RicardasS@78-63-172-44.static.zebra.lt> has joined ##vulkan
[09:07:08] *** emersont1 <emersont1!~emersont1@host109-154-50-137.range109-154.btcentralplus.com> has quit IRC (Remote host closed the connection)
[09:30:04] *** haasn` is now known as haasn
[09:45:34] *** RicardasSim <RicardasSim!~RicardasS@78-63-172-44.static.zebra.lt> has quit IRC (Quit: Leaving)
[09:54:23] *** Deluxe <Deluxe!~Deluxe@2001:67c:1220:80e:e9:1d2:f14f:e47f> has joined ##vulkan
[10:08:45] *** ratchetfreak <ratchetfreak!c351a8d8@gateway/web/freenode/ip.195.81.168.216> has joined ##vulkan
[10:42:51] *** notadeveloper <notadeveloper!notadevelo@unaffiliated/notadeveloper> has joined ##vulkan
[10:43:05] <notadeveloper> hi what is a good math library for vulkan
[10:54:23] *** grouse <grouse!~grouse@83-233-9-2.cust.bredband2.com> has joined ##vulkan
[11:14:30] *** gaulishcoin <gaulishcoin!~gaulishco@anice-652-1-117-10.w83-201.abo.wanadoo.fr> has joined ##vulkan
[11:44:08] *** SolderBlob1 <SolderBlob1!~SolderBlo@95.174.67.140> has joined ##vulkan
[11:48:01] *** SolderBlob <SolderBlob!~SolderBlo@212.103.50.52> has quit IRC (Ping timeout: 255 seconds)
[12:03:55] *** Deluxe <Deluxe!~Deluxe@2001:67c:1220:80e:e9:1d2:f14f:e47f> has quit IRC (Remote host closed the connection)
[12:05:19] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has joined ##vulkan
[12:09:05] *** stamina <stamina!~stamina@247-187-128-083.dynamic.caiway.nl> has joined ##vulkan
[12:30:43] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has quit IRC (Quit: This computer has gone to sleep)
[12:46:43] *** Andrej1 <Andrej1!~Andrej@BSN-176-129-143.dynamic.siol.net> has joined ##vulkan
[13:02:26] *** LigH <LigH!~LigH@planeshift/bugs/LigH> has joined ##vulkan
[13:02:33] <LigH> Hi.
[13:04:15] <LigH> The project vulkan-loader fails compiling in the media-autobuild_suite (MSYS2 / MinGW) due to a TypeError in _compile() in python3.7/re.py; can you imagine any reason, and in which part of the project one should look further?
[13:35:17] *** vmt <vmt!~vmt@pop.ax> has joined ##vulkan
[13:47:50] *** eetsi123 <eetsi123!~eetu@91-152-205-56.elisa-laajakaista.fi> has quit IRC (Quit: WeeChat 2.4)
[13:51:09] <Yaniel> notadeveloper: glm
[14:32:24] *** RicardasSim <RicardasSim!~RicardasS@78-63-172-44.static.zebra.lt> has joined ##vulkan
[14:37:04] *** Deluxe <Deluxe!~Deluxe@2001:67c:1220:80e:e9:1d2:f14f:e47f> has joined ##vulkan
[14:39:21] <LigH> Hi.
[14:39:27] <LigH> The project vulkan-loader fails compiling in the media-autobuild_suite (MSYS2 / MinGW) due to a TypeError in _compile() in python3.7/re.py; can you imagine any reason, and in which part of the project one should look further?
[15:08:16] *** notadeveloper <notadeveloper!notadevelo@unaffiliated/notadeveloper> has quit IRC ()
[15:24:08] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has joined ##vulkan
[16:08:41] *** LigH <LigH!~LigH@planeshift/bugs/LigH> has quit IRC (Quit: Leaving)
[16:32:56] *** Deluxe <Deluxe!~Deluxe@2001:67c:1220:80e:e9:1d2:f14f:e47f> has quit IRC (Remote host closed the connection)
[16:45:15] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has quit IRC (Remote host closed the connection)
[17:03:28] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has joined ##vulkan
[17:11:34] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has quit IRC (Remote host closed the connection)
[17:12:45] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has joined ##vulkan
[17:13:23] *** Lucretia <Lucretia!~Luke@pdpc/supporter/active/lucretia> has quit IRC (Quit: Konversation terminated!)
[17:18:31] *** Lucretia <Lucretia!~Luke@pdpc/supporter/active/lucretia> has joined ##vulkan
[17:23:02] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)
[17:50:27] *** grouse <grouse!~grouse@83-233-9-2.cust.bredband2.com> has quit IRC (Quit: Leaving)
[18:01:00] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has quit IRC (Ping timeout: 246 seconds)
[18:25:52] *** Deluxe <Deluxe!~Deluxe@212.4.150.151> has joined ##vulkan
[18:31:38] *** me80iq <me80iq!~me80iq@p2003000613F37C35DC4E1AA4BBB5FDF3.dip0.t-ipconnect.de> has joined ##vulkan
[18:32:12] <me80iq> Hi. I'm a noob. I want to read in an image as a heightmap. I've created an image view from that heightmap. How do I read the texels from the imageview?
[18:33:00] <ratchetfreak> like you would any other 1 channel image
[18:33:06] <derhass> what is an imageview?
[18:34:16] <me80iq> VkImageVIew
[18:34:19] <derhass> forget what I wrote, I just confused myself
[18:38:55] <me80iq> Where can I find out how to access the texels in an imageview?
[18:39:08] <me80iq> I miss be misunderstanding something
[18:39:10] <me80iq> must*
[18:44:56] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has joined ##vulkan
[18:46:21] *** ratchetfreak <ratchetfreak!c351a8d8@gateway/web/freenode/ip.195.81.168.216> has quit IRC (Ping timeout: 256 seconds)
[18:59:34] *** RicardasSim <RicardasSim!~RicardasS@78-63-172-44.static.zebra.lt> has quit IRC (Quit: Leaving)
[19:14:57] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has quit IRC (Read error: Connection reset by peer)
[19:33:27] *** ratchet_freak <ratchet_freak!~ratchetfr@ptr-82s3g7l9r42569r41f4.18120a2.ip6.access.telenet.be> has joined ##vulkan
[19:40:11] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has joined ##vulkan
[19:48:44] *** LunarJetman2 <LunarJetman2!LunarJetma@5ec16e1a.skybroadband.com> has joined ##vulkan
[19:49:21] <Ralith> me80iq: you define a `uniform sampler2D` in a shader and read from it with the glsl `texture` function
[19:50:07] *** stamina <stamina!~stamina@247-187-128-083.dynamic.caiway.nl> has quit IRC (Quit: WeeChat 2.4)
[19:50:25] <Ralith> on the host, you define a pipeline using that shader with a matching layout, then create a descriptor set, bind your view to the descriptor in question, and bind the descriptor set before drawing with the pipeline
[19:53:31] <Ralith> note that for rendering grids, it's usually easier to just generate the vertices in the vertex shader than to compute them into a vertex buffer in advance
[20:14:10] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has joined ##vulkan
[20:31:39] <me80iq> Ralith: Hey -- yeah that's what I ended up doing.
[20:31:47] <me80iq> Ralith: except I'm computing the vertex grid outside of the shader
[21:15:33] *** glYoda <glYoda!~MTLYoda@c-73-25-27-206.hsd1.or.comcast.net> has quit IRC (Quit: glYoda)
[21:22:46] *** slime <slime!~slime73@blk-215-81-93.eastlink.ca> has joined ##vulkan
[21:28:57] *** emersont1 <emersont1!~emersont1@host109-154-50-137.range109-154.btcentralplus.com> has joined ##vulkan
[21:46:36] <Ralith> me80iq: that's a lot more work and less flexibility, but okay :p
[21:47:20] <Ralith> generating vertices in the vertex shader is particularly useful when not all grids are exactly the same, for example if your terrain is curved, or if you need to stitch together LoD patches
[22:02:30] *** emersont1 <emersont1!~emersont1@host109-154-50-137.range109-154.btcentralplus.com> has quit IRC (Ping timeout: 246 seconds)
[22:07:24] *** gaulishcoin <gaulishcoin!~gaulishco@anice-652-1-117-10.w83-201.abo.wanadoo.fr> has quit IRC (Remote host closed the connection)
[22:16:30] <me80iq> Ralith: Okay I should switch it then! What's an LoD patch? How would I generate it in the shader? The shader is called for each vertex, wouldn't successive calls need to communicate to know where to place the vertex?
[22:17:01] <Ralith> if you have working code and you're just messing around I wouldn't worry about it too much either way
[22:17:27] <me80iq> Ralith: sure but my goal here is to learn rather than create something
[22:17:46] <me80iq> so it would good to know if you'd like to explain :^)
[22:18:30] <Ralith> LoD is short for level-of-detail; for very large, detailed terrains you only want to be rendering the nearby parts at full geometric resolution, so you down-sample distant parts
[22:19:19] <me80iq> Oh Right. So based on the camera position you modify grid density on the fly?
[22:19:28] <Ralith> heightmaps make this relatively easy, but you do have to be careful of the boundaries between different LoDs to avoid having visible discontinuities (i.e. gaps) in the terrain
[22:20:10] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has quit IRC (Ping timeout: 272 seconds)
[22:20:20] <me80iq> funny that you mention that -- I had that very problem when trying to mesh together 3d noise volumes of different densities
[22:20:37] <me80iq> But I don't get how you create a grid within the shader
[22:20:44] <Ralith> an "LoD patch" refers to a section of geometry at a particular level of detail
[22:20:50] <Ralith> well, grids are very regular
[22:20:53] <Ralith> by definition
[22:21:50] <me80iq> so do you pass grid parameters between shaders?
[22:21:54] <Ralith> in Vulkan, every vertex shader invocation has access to a `gl_VertexIndex` variable which tells you which vertex the shader is processing
[22:22:33] <Ralith> if you stick the desired resolution of your grid in a uniform (or w/e), it's then simple arithmetic to compute the coordinates of vertex N
[22:23:42] <me80iq> Wow - yeah
[22:23:59] <me80iq> Damn I wasted so much time making a grid with variable densities
[22:24:05] <me80iq> trying to not have repeat vertices
[22:24:12] <me80iq> doing what you've suggested is so much better
[22:24:15] <me80iq> thanks
[22:24:29] <Ralith> for example, say you have an RxR grid; that means you have (R-1)x(R-1) quads; each quad is two triangles; so you just use division and modulus to compute the x/y coordinates of the quad the vertex is in, select which triangle, and decide which vretex of the triangle to use
[22:24:52] <Ralith> the best part is how you can solve LoD stitching once you've got this
[22:25:22] *** Deluxe <Deluxe!~Deluxe@212.4.150.151> has quit IRC (Read error: Connection reset by peer)
[22:25:57] <Ralith> if you restrict yourself to power-of-two grid resolutions, then whenever the neighboring LoD chunk is one power of two lower-resolution, you just clamp every other vertex on that edge to the position of its predecessor
[22:26:18] <Ralith> if it's two powers of two lower reoslution, you clamp out 3 out of every 4 vertices
[22:26:24] <Ralith> for three, 7 out of every 8
[22:26:26] <Ralith> etc
[22:27:25] <Ralith> and you can do that just by computing the coordinates of each vertex in integer terms, and then masking out the lowest N bits for an edge shared with a tile that's N powers of two lower-resolution
[22:28:14] <me80iq> What do you mean "decide which vertex of the tirangle to use"? The gl_vertexIndex you said tells you which vertex you're currently processing
[22:29:50] <Ralith> I just have a `const uvec2 quad[6] = ...;` in my shader, and index it with gl_VertexIndex % 6
[22:30:24] <Ralith> add that to the base coordinates of the quad you computed, and there's your integer vertex coordinates
[22:31:34] <Ralith> also, be sure you take care to account for the exact positions of texel centers
[22:31:46] <Ralith> texcoord 0,0 is the corner of a texel, not its center
[22:32:10] <me80iq> quad[6] are the indices of the 4 vertices tha make a quad?
[22:32:14] <me80iq> that*
[22:32:57] <Ralith> it's just `{{0, 0}, {1, 0}, {1, 1}, {0, 0}, {1, 1}, {0, 1}}`
[22:34:23] <Ralith> they're the coordinates of the vertex relative to the corner of the quad, in units of grid cells
[22:35:00] <me80iq> and you know where the corner of the quad is based off the gl_vertexindex variable?
[22:36:42] <Ralith> let `uint quad = gl_VertexIndex / 6;`, then `uvec2 quad_grid_coordinates = uvec2(quad % (resolution - 1), quad / (resolution - 1));`
[22:37:37] <Ralith> note that it's `resolution - 1` that must be a power of two for the clever stitching of LoD boundaries to work
[22:37:58] <me80iq> Okay awesome. I'm going to implement this. Thanks for the help :D
[22:37:59] <Ralith> sadly this means your heightmap textures won't themselves be powers of two
[22:38:06] <Ralith> haffun!
[22:38:12] <Ralith> bufferless drawing is always a good time
[22:38:30] <me80iq> why couldnt the heightmap textures be powers of two?
[22:38:43] <me80iq> and why is that bad? for mip-maps?
[22:38:54] <me80iq> I'm new to all of this :^)
[22:39:45] <Ralith> if your heightmap textures are powers of two, then resolution - 1, i.e. the number of quads along an edge of a heightmap, won't be a power of two, so you can't easily stitch together neighboring heightmaps of differing LoD
[22:40:07] <me80iq> ohhhhhhh
[22:40:45] <me80iq> thanks for explanation
[22:40:53] <me80iq> for the*
[22:40:53] <Ralith> because that relies on being able to collapse exactly half the edges of the higher detail side of an LoD boundary
[22:41:49] <Ralith> though now that I think about it it doesn't have to be a power of two, it just has to be divisible by one
[22:42:33] <Ralith> and how large that power of two is governs how many LoD levels you can gracefully stitch across
[22:43:39] <me80iq> Okay. Gonna try and implement this
[22:43:50] <Ralith> well, that then gets into the exact toplogy with which you're laying out your LoD tiles
[22:44:03] <Ralith> stick to power of two numbers of quads per edge and everything will work out :P
[22:44:21] <me80iq> Okay! thanks again. See ya
[22:44:51] <Ralith> \o
[22:45:10] *** me80iq <me80iq!~me80iq@p2003000613F37C35DC4E1AA4BBB5FDF3.dip0.t-ipconnect.de> has quit IRC (Quit: WeeChat 2.4)
[22:56:14] <Ralith> okay, yeah, you need an exponential base to be able to tile, and it needs to be even to stitch, so powers of two are mandatory
[22:58:45] *** glYoda <glYoda!~MTLYoda@c-73-25-27-206.hsd1.or.comcast.net> has joined ##vulkan
[23:08:06] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has joined ##vulkan
[23:09:07] *** mandeep <mandeep!~mandeep@unaffiliated/mandeepb> has quit IRC (Remote host closed the connection)
[23:47:02] *** davr0s <davr0s!~textual@host81-147-72-11.range81-147.btcentralplus.com> has quit IRC (Quit: My MacBook Pro has gone to sleep. ZZZzzz…)