Skip to content

Commit

Permalink
content
Browse files Browse the repository at this point in the history
  • Loading branch information
swift502 committed Feb 21, 2024
1 parent 56d1835 commit 6f00ac9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 5 additions & 4 deletions src/content_blocks/Code.astro
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ import ContentDescription from "../components/content_block/ContentDescription.a
const { project, contentBlock } = Astro.props;
const code = hljs.highlightAuto(
contentBlock.properties.data
const code = hljs.highlight(
contentBlock.properties.data,
{ language: contentBlock.properties.lang }
).value
const contentBlockId = "code-block-" + contentBlock.index;
Expand Down Expand Up @@ -63,12 +64,12 @@ const borderClass = 'desc' in contentBlock.properties ? ' border-radius-top' : '
@media (max-width: 776px) {
.code-file {
position: relative;
background: ##FAFAFA;
background: none;
padding-bottom: 0;
width: 100%;
box-sizing: border-box;
}
}

</style>

<style is:global>
Expand Down
8 changes: 5 additions & 3 deletions src/data/projects/projection-converter.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
title: Projection converter
title: Map projection converter
description: Placeholder
tags:
- 2024
Expand Down Expand Up @@ -32,8 +32,9 @@ page:
return vec2(x, y);
}
lang: glsl
file: fragment_to_equirectangular.glsl
link: https://github.com/swift502/EquimercConverter/blob/main/src/shaders/fragment_to_equirectangular.glsl
link: https://github.com/swift502/EquimercConverter/blob/main/src/shaders/fragment_to_equirectangular.glsl#L14-L29
desc: |-
Using the [moderngl](https://github.com/moderngl/moderngl) python library, the converter runs the input image through a remapping shader. The shaders transform uv coordinates to latitude and longitude and then convert between the two projections.
Additionally, this implementation can also render with either nearest or linear texture sampling, letting you choose between a sharp or interpolated upscaling.
Expand All @@ -58,6 +59,7 @@ page:
y = clamp(y, 0, 1)
return (x, y)
lang: python
file: cpu_render.py
link: https://github.com/swift502/EquimercConverter/blob/main/src/cpu_render.py
link: https://github.com/swift502/EquimercConverter/blob/main/src/cpu_render.py#L13-L31
desc: A CPU implementation using the [Pillow](https://github.com/python-pillow/Pillow) library exists as a fallback, although with obvious downsides of poor performance and scalability.

0 comments on commit 6f00ac9

Please sign in to comment.