11import { useRef , useMemo } from 'react' ;
2- import { useFrame , useLoader } from '@react-three/fiber' ;
3- import { TextureLoader , AdditiveBlending , BackSide } from 'three' ;
2+ import { useFrame } from '@react-three/fiber' ;
3+ import { AdditiveBlending , BackSide } from 'three' ;
44import type { ShaderMaterial } from 'three' ;
55import { useScene } from '@/hooks/useScene' ;
66import { useCelestialPositions } from '@/hooks/useCelestialPositions' ;
7- import { TEXTURE_URLS } from '@/lib/constants' ;
87
98// Simplex noise for surface turbulence
109const noiseFunction = `
@@ -99,7 +98,6 @@ const sunVertexShader = `
9998` ;
10099
101100const sunFragmentShader = `
102- uniform sampler2D map;
103101 uniform float time;
104102
105103 varying vec2 vUv;
@@ -109,8 +107,7 @@ const sunFragmentShader = `
109107 ${ noiseFunction }
110108
111109 void main() {
112- // Base texture
113- vec3 texColor = texture2D(map, vUv).rgb;
110+ // Fully procedural - no texture needed
114111
115112 // Animated surface turbulence - multiple layers for complexity
116113 vec3 noisePos = vPosition * 2.0 + vec3(time * 0.05, time * 0.03, time * 0.04);
@@ -165,8 +162,8 @@ const sunFragmentShader = `
165162 // Apply subtle edge variation and pulse
166163 surfaceColor *= edgeFactor * deepPulse;
167164
168- // Blend with original texture for photorealistic detail
169- vec3 finalColor = mix( surfaceColor, texColor * 1.3, 0.25) ;
165+ // Final surface color (fully procedural)
166+ vec3 finalColor = surfaceColor;
170167
171168 // Final intensity boost - make it HOT
172169 finalColor *= 1.5 * pulse;
@@ -260,15 +257,13 @@ const coronaFragmentShader = `
260257export function Sun ( ) {
261258 const { scale } = useScene ( ) ;
262259 const { sun } = useCelestialPositions ( ) ;
263- const texture = useLoader ( TextureLoader , TEXTURE_URLS . sun . surface2k ) ;
264260 const materialRef = useRef < ShaderMaterial > ( null ) ;
265261
266262 const uniforms = useMemo (
267263 ( ) => ( {
268- map : { value : texture } ,
269264 time : { value : 0 } ,
270265 } ) ,
271- [ texture ]
266+ [ ]
272267 ) ;
273268
274269 // Multiple corona layers for soft falloff - increased intensity for dramatic effect
0 commit comments