mirror of
https://github.com/IllusionMan1212/cudoku.git
synced 2026-10-24 02:12:25 +00:00
cell selection and number input
This commit is contained in:
+5
-4
@@ -31,12 +31,13 @@ void main()
|
||||
bool isInsideGrid = isInsideGridHorizontally && isInsideGridVertically;
|
||||
|
||||
// Determine if the current fragment is on a thicker grid line
|
||||
bool isThickLineX = isInsideGrid && mod(fragCoordX, stepSize * 3) < 0.01;
|
||||
bool isThickLineY = isInsideGrid && mod(fragCoordY, stepSize * 3) < 0.01;
|
||||
bool isThickLineX = isInsideGrid && mod(fragCoordX, (stepSize + 0.0007) * 3) <= 0.01;
|
||||
bool isThickLineY = isInsideGrid && mod(fragCoordY, (stepSize + 0.0007) * 3) <= 0.01;
|
||||
|
||||
// Check if the current fragment is on a grid line
|
||||
bool isGridX = isInsideGrid && mod(fragCoordX, stepSize) < 0.005;
|
||||
bool isGridY = isInsideGrid && mod(fragCoordY, stepSize) < 0.005;
|
||||
// 0.0007 to shift the grid lines a bit to the left
|
||||
bool isGridX = isInsideGrid && mod(fragCoordX, stepSize + 0.0007) <= 0.005;
|
||||
bool isGridY = isInsideGrid && mod(fragCoordY, stepSize + 0.0007) <= 0.005;
|
||||
|
||||
// Set the fragment color based on whether it's a grid line or a thicker grid line
|
||||
if ((isThickLineX) || (isThickLineY)) {
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
#version 330 core
|
||||
|
||||
out vec4 FragColor;
|
||||
|
||||
void main() {
|
||||
FragColor = vec4(0.4, 0.4, 1.0, 0.5);
|
||||
}
|
||||
Reference in New Issue
Block a user